- Authenticating with the Snowflake Connector
- Streaming Data
- Unloading data directly from Snowflake
- Backfilling a Snowflake Schema using the Connector
Authenticating with the Snowflake Connector
Getting Started
Snowflake offers drivers which allow you to perform operations on Snowflake from application code. There are many language implementations including Python and NodeJS: To get started, you can authenticate using either a password or private key, depending on your desired method. Examples Connecting with a Private KeyStreaming Data
A Snowflake Stream is a great way to stream new and/or altered data from Snowflake to any storage destination. There are two steps you must take to get started:Getting Started
- Create a stream on any table or view using a Snowflake command.
- Consume the stream using any DML action. Below is an example of exporting the stream to a stage.
Use a Snowflake Connector
Unloading data directly from Snowflake
If you wish to export data directly from Snowflake to any external storage location, data unloading commands is a great way to accomplish this. Below is an example of using SQL to unload data from a Snowflake table to parquet file format. To get started, follow these steps:- Create an external stage which points to the cloud bucket storage location you wish to unload the files to.
- Use the COPY INTO <location
>command to copy the data from the Snowflake table into one or more files in the storage destination.
It’s important to note that using this method of unloading data can incur egress costs depending on the destination the data is unloaded to.
Backfilling a Snowflake Schema using the Connector
Another option for exporting data from Snowflake to any destination is to use the Snowflake Connector. The example below demonstrates backfilling an entire Snowflake schema to local files, but you can easily adapt it to export the data to any destination you prefer. One advantage of using this method is that you will not incur egress costs, as querying data from Snowflake is free. Example Code- The
DATE_CREATED/DATE_UPDATEDfields in our Snowflake tables allow users to know when any update has happened.