Snowflake agent
Union.ai can be seamlessly integrated with the Snowflake service, allowing you to easily query data in Snowflake.
Installation
To use the Snowflake agent, run the following command:
pip install flytekitplugins-snowflake
Configuring key-pair authentication
Get the metadata for the task
The user, account, database, warehouse, and schema metadata are required to configure the Snowflake task.
Run the following SQL in the Snowflake console to get the metadata:
SELECT
CURRENT_USER() AS "User",
CONCAT(CURRENT_ORGANIZATION_NAME(), '-', CURRENT_ACCOUNT_NAME()) AS "Account",
CURRENT_DATABASE() AS "Database",
CURRENT_SCHEMA() AS "Schema",
CURRENT_WAREHOUSE() AS "Warehouse";
Example usage
For a usage example, see Snowflake agent example.
Local testing
Create a secret file that contains the Snowflake private key:
sudo vim /etc/secrets/snowflake
Union.ai cluster deployment
After you have finished testing the agent locally, contact the Union.ai team to enable it in your cluster.