- Create python virtual environment
python3 -m venv env - Install the requirements.txt
python3 -m pip install -r requirements.txt - Initialize DBT project
dbt init. Identifier account should be :<orgname>-<account_name> - Choose keypair auth for more secure way to authenticate
- Generate key pair and setup public key for specific user in Snowflake https://docs.snowflake.com/en/user-guide/key-pair-auth
- Run your first model
dbt run -s my_first_dbt_model - If database not found don't forget to create it first using
CREATE DATABASE <DB_NAME>; - Setup profiles.yml https://docs.getdbt.com/docs/core/connect-data-platform/snowflake-setup
- Setup sources https://docs.getdbt.com/docs/build/sources
- Open the profiles.yml
- For the confidentials params/keys replace the value with
"{{ env_var('VAR_NAME') }}" - Run Command
EXPORT VAR_NAME=<confidential_value>
- How to structure DBT Project : https://towardsdatascience.com/staging-intermediate-mart-models-dbt-2a759ecc1db1
- Public dataset Global Climate : https://app.snowflake.com/marketplace/listing/GZSOZ1LLD8/weather-source-llc-global-weather-climate-data-for-bi
- Sources YAML : https://docs.getdbt.com/docs/build/sources
- Incremental model : https://docs.getdbt.com/docs/build/incremental-models
- DBT utils package : https://hub.getdbt.com/dbt-labs/dbt_utils/latest/