Snowflake¶
Snowflake can either be used as a data source or a data destination in Zuar Runner.
Source plugin example: Query
Destination plugin examples: CSV, Salesforce, SQL
Using Snowflake as a Data Destination¶
Note the following considerations when sending Zuar Runner job output to Snowflake.
Zuar Runnner will automatically:
Create the Snowflake database schema if it doesn’t exist
Create the Snowflake database tables if they don’t exist
Determine data types for Snowflake columns
Add new columns to Snowflake tables based on new fields in source data
Adjust Snowflake tables based on changes in source data
Snowflake Database URL Setup¶
The database url structure for connecting to a Snowflake database uses this format:
snowflake://<user_login_name>:<password>@<account_identifier>/<database>?warehouse=<warehouse_name>
user_login_name
: The username Runner uses to authenticate to your Snowflake instancepassword
: The password of the Snowflake user specified aboveaccount_identifier
:After logging into your Snowflake account console in a web browser, the account identifier should be found in the browser URL here: https://``<account_identifier>``.snowflakecomputing.com
Do not include the snowflakecomputing.com domain name as part of your account identifier.
More information on determining your account identifier .
database
: Name of the database where Runner should write job outputwarehouse_name
: Name of the warehouse that contains the above database
At a mimimum, we recommend including all of the components above. You can also include schema
and role
if the defaults for the user account are not appropriate to your specific needs using this format:
snowflake://<user_login_name>:<password>@<account_identifier>/<database_name>/<schema_name>?warehouse=<warehouse_name>&role=<role_name>
schema
is also an option in the Runner job configuration. Use this option if you need
to change schemas on a per-job basis.
Note
When outputting to a Snowflake database, leaving the schema blank will create a table in the public schema.
Reference: Using Snowflake via the Python connector .
Here’s an example of using a Snowflake database as a destination in a CSV job:
SQL¶
Zuar Runner can send SQL statements to a Snowflake database. Use Snowflake SQL syntax in these Zuar Runner SQL jobs.
Cheat Sheet¶
The Zuar team has ample experience working with Snowflake. The team has created this cheat sheet to help you get started: Snowflake Cheat Sheet