This is a dbt template configured for ephemeral cloud development environments on Gitpod. The project is based on the famous jaffle_shop example.
Before you can connect to Snowflake, you need to create the following six environment variables in Gitpod. This template uses Snowflake's key pair authentication method. By changing the environment variables and adapting the profiles.yml, it is possible to connect to Snowflake using the other methods that are listed in the dbt documentation. Since this config includes your private key, we encourage you to only use it for testing. Please check this blog post on how to manage your SSH keys with 1password.
DBT_SNOWFLAKE_USER: your usernameDBT_SNOWFLAKE_PRIVATE_KEY: the content of the private SSH key file (ensure that newlines are represented by whitespaces)DBT_SNOWFLAKE_ACCOUNT: the address of your Snowflake instanceDBT_SNOWFLAKE_WH: the name of the warehouseDBT_SNOWFLAKE_DB: the name of the databaseDBT_SNOWFLAKE_SCHEMA: the name of the schema you want to use for dbt
Please check the dbt configuration if you want to connect to any other data warehouse.
Click the button below to start a new development environment:
The workspace will then try to connect to your data warehose. To use the models in this example project you need to run the following commands.
dbt seed: to materialize the CSVsdbt run: to run the modelsdbt test: to test all models
Click the above "Open in Gitpod" button to start a new workspace. Once you're ready to push your first code changes, Gitpod will guide you to fork this project so you own it.
To get started with dbt on Gitpod, add a .gitpod.yml to any of your existing dbt projects. To learn more, please see the Getting Started documentation.