Snowflake
In Illa, you can use the Snowflake query editor to execute SQL queries against your Snowflake data warehouse. You can connect to Snowflake by entering your Snowflake account credentials, including the account name, username, password, and warehouse name. Once you have connected to Snowflake, you can use the query editor to write and execute SQL queries to retrieve, manipulate, and analyze your data.
Create Snowflake
There are two ways to create a resource in Illa after signing into your Illa account.
- Create in Resources
Sign into your Illa account, select **Resources**
on the top of the page, and click **Create New**
button.
Select Snowflake
from the database list.
Connect to the database with the required parameters described in Connection Settings
below.
Click **Test Connection**
to see if we can successfully connect to the database. If yes, click Save Resources
, else, double check the hostname, port, username, and password is correct.
After creating a resource, the ready Snowflake will display as shown.
- Create in Builder
Sign into your Illa account, create a project in Illa Builder in the **App**
page, and navigate to the Action List
at the bottom of the page. Click **new**
, then select Snowflake
from the database list. Then, connect to the database with required parameters described in Connection Settings
below.
Click **Test Connection**
to see if we can successfully connect to the database. If yes, click Save Resources
, else, double check the hostname, port, username, and password is correct.
Connection Settings
Here we need to provide information for connecting to Snowflake database.
Properties | Required | Description |
---|---|---|
Name | required | The name for resource when creating actions in the ILLA. |
Account name | required | unique identifier that is assigned to each Snowflake account |
Warehouse | required | a cluster of compute resources that are used to process queries and run analytical workloads |
Database | required | The name of the database |
Schema | optional | a container that holds database objects such as tables, views, and procedures |
Role | optional | a named set of privileges that can be assigned to one or more users |
Authentication | required | secure access to your data and resources in the Snowflake data warehouse (Basic Auth or Key Pair (only encrypted private keys are supported)) |
Username | required | the username you wish to use when logging in to the Snowflake server. |
Password | required | Use this password for authentication. |
Create Actions
We have created a Snowflake resource, we can add the action by selecting Snowflake from action list and choosing the Create action
button.
Now we have added the Snowflake server as an action to our building page.
Configure Snowflake
Properties | Description |
---|---|
SQL query | sql commands to fetch (select), insert, update, delete data from database |
Transformer | transforming data into the style you like using JavaScript |
Example usage:
- Select
SELECT * FROM users ORDER BY lastname;
- Insert
INSERT INTO users
(firstname, lastname, email)
VALUES
(
{{ NewUser.data.firstNameInput }},
{{ NewUser.data.lastNameInput }},
{{ NewUser.data.emailInput }}
);
- Update
UPDATE users
SET firstname = '{{form1.updatedProfile.first}}'
WHERE id = {{ form1.updatedProfile.uid}};
- Delete
DELETE FROM users WHERE id = {{ form1.updatedProfile.uid }};