There are two ways to set up the necessary Snowflake resources and run the loader:
- using our dedicated open source Terraform modules to create the resources and deploy the loader on EC2
- creating the resources and running the application manually.
We recommend the first way.
Using the Terraform modules
- Terraform >= 1.0.0
terraform-aws-snowflake-loader-setup modules create the necessary Snowflake resources to run the loader. The outputs of these modules become inputs to the
Stitching these modules together is described here.
We also have full pipeline deployment examples here, including a deployment example for a pipeline with Snowflake as destination. This lets you see how all the Terraform modules are used in a full pipeline deployment.
Manual setup and deployment
Setting up Snowflake
The following resources need to be created:
- Snowflake loader user
- Snowflake loader role
- Snowflake warehouse
- Snowflake database
- Snowflake schema
eventstable in the same schema (see here for the schema)
- Snowflake storage integration
- Snowflake file format
- Snowflake stage to load transformed events.
Creating Snowflake stage for transformed events
The Snowflake stage is the most complicated one to create from the resources listed above.
To create a Snowflake stage, you need a Snowflake database, Snowflake schema, Snowflake storage integration, Snowflake file format, and the S3 path to the transformed events bucket.
You can follow this tutorial to create the storage integration.
Assuming you created the other required resources for it, you can create the Snowflake stage by following this document.
Downloading the artefact
The asset is published as a jar file attached to the Github release notes for each version.
It’s also available as a Docker image on Docker Hub under
The loader takes two configuration files:
config.hoconfile with application settings
iglu_resolver.jsonfile with the resolver configuration for your Iglu schema registry.
See here for details on how to prepare the Iglu resolver file.
NOTE: All self-describing schemas for events processed by RDB Loader must be hosted on Iglu Server 0.6.0 or above. Iglu Central is a registry containing Snowplow-authored schemas. If you want to use them alongside your own, you will need to add it to your resolver file. Keep it mind that it could override your own private schemas if you give it higher priority. For details on this see here.
Running the Snowflake loader
The two config files need to be passed in as base64-encoded strings:
Code language: PHP (php)
$ docker run snowplow/rdb-loader-snowflake:4.0.2 \ --iglu-config $RESOLVER_BASE64 \ --config $CONFIG_BASE64