Snowflake
This page provides information for connecting your application to your Snowflake database and using queries to manage its content.
Connect Snowflake
To connect to Snowflake, you must whitelist the IP addresses 18.223.74.85 and 3.131.104.27 of the Appsmith deployment, as well as your own machine's IP address. See Snowflake's Network Policies docs for more details.
Connection parameters
The following section is a reference guide that provides a complete description of all the parameters to connect to a Snowflake database.
Account Name
orgName-accountName
. You can find your organization name and account name on the Snowflake dashboard at the bottom-left of the page; click the string next to the Snowflake logo to open an information box with your details.Warehouse
Database
Default Schema
Role
Username
Password
Query Snowflake
The following section provides examples of creating basic CRUD queries for Snowflake.
Fetch data
SELECT * FROM customer
OFFSET {{ CustomerTable.pageOffset }} ROWS
FETCH NEXT {{ CustomerTable.pageSize }} ROWS ONLY;
In the above example, CustomerTable
is the name of the Table widget used to display the data using server-side pagination to control how much data is queried at once.
Insert data
INSERT INTO customer
(id, name, address, email)
VALUES
(
DEFAULT,
{{ NameInput.text }},
{{ AddressInput.text }},
{{ EmailInput.text }}
);
In the above example, NameInput
, AddressInput
, and EmailInput
are the names of the widgets used to capture input from the user for name, address, and email fields, respectively.
Update data
UPDATE customer
SET email = {{ EmailInput.text }}
WHERE id = {{ CustomerTable.selectedRow.id }};
In the above example, EmailInput
is the name of the Input widget used to capture the email entered by the user. CustomerTable
is the Table widget where the user selects the row to update the user's email.
Delete data
DELETE FROM customer WHERE id = {{ CustomerTable.selectedRow.id }};
In the above example, CustomerTable
is the name of the Table widget where the user selects the row for deletion.
Troubleshooting
If you are experiencing difficulties, you can refer to the Datasource troubleshooting guide or contact the support team using the chat widget at the bottom right of this page.