I'm new to DBT and Data Engineering in general and I'm trying to run DBT CLI which is what we have currently in my company and after fixing some issues with the profile.yml and the dbt_project.yml I came across a problem that I really don't know how to fix.
when I try to run my tests with I get the following error so I rand the debug command for profile and I got the following:
dbt debug --profile snowtracks_dbt
Running with dbt=0.18.1
dbt version: 0.18.1
python version: 3.8.7
python path: /usr/local/Cellar/dbt/0.18.1_1/libexec/bin/python3
os info: macOS-11.1-x86_64-i386-64bit
Using profiles.yml file at /Users/userName/.dbt/profiles.yml
Using dbt_project.yml file at /Users/UserName/snowtracks_dbt/dbt_project.yml
Configuration:
profiles.yml file [ERROR invalid]
dbt_project.yml file [OK found and valid]
Profile loading failed for the following reason:
Runtime Error
Compilation Error
Could not render {{ env_var('SF_ACCOUNT') }}: Env var required but not provided: 'SF_ACCOUNT'
Required dependencies:
- git [OK found]
This is the Profile file I currently have:
# For more information on how to configure this file, please see:
# https://docs.getdbt.com/docs/profile
snowtracks_dbt:
target: dev
outputs:
dev:
type: snowflake
account: "{{ env_var('SF_ACCOUNT') }}"
user: "{{ env_var('SF_USER_DEV') }}"
role: "{{ env_var('SF_ROLE_DEV') }}"
private_key_path: /tmp/rsa_key_dev.p8
private_key_passphrase: "{{ env_var('SF_PRV_KEY_DEV_PARAPHRASE') }}"
database: "{{ env_var('SF_DEV_DB') }}"
warehouse: "{{ env_var('SF_DEV_WH') }}"
schema: UNIFIED
threads: 4
client_session_keep_alive: False
prod:
type: snowflake
account: "{{ env_var('SF_ACCOUNT') }}"
user: "{{ env_var('SF_USER_PROD') }}"
role: "{{ env_var('SF_ROLE_PROD') }}"
private_key_path: /tmp/rsa_key_prod.p8
private_key_passphrase: "{{ env_var('SF_PRV_KEY_PROD_PARAPHRASE') }}"
database: "{{ env_var('SF_PROD_DB') }}"
warehouse: "{{ env_var('SF_PROD_WH') }}"
schema: UNIFIED
threads: 8
client_session_keep_alive: False
Any help for a noob would be appreciated :)
Looks like your SF_ACCOUNT environment variable isn't set and you have to configure it before.