Before running shadowfax, you need to create a shadowfax.yml and shadowfax_profiles.yml file. The shadowfax.yml lets you configure workspace settings such as environment variables, secrets, and special instructions. The shadowfax_profiles.yml lets you configure the dbt profiles that shadowfax will use to connect to your data. These two files should be placed in the root of your GitHub repository.
Here is an example of a shadowfax.yml file:
setup:
- echo "Running setup commands"
- echo "Installing dependencies"
env_vars:
FIRST_ENV_VAR: first_env_var_value
SECOND_ENV_VAR: second_env_var_value
secrets:
- name: MY_FIRST_SECRET
as: first_secret_env_name
- name: MY_SECOND_SECRET
as: second_secret_env_name
dbt_root_path: transforms/dbt-project
instruction: |
Make sure to add tests to any new models you create.
Let's break down the file:
Here is an example of a shadowfax_profiles.yml file (see example on GitHub):
default:
target: dev
outputs:
dev:
type: snowflake
account: "{{ env_var('SNOWFLAKE_ACCOUNT') }}"
user: "{{ env_var('SNOWFLAKE_USER') }}"
password: "{{ env_var('SNOWFLAKE_PASSWORD') }}"
role: "{{ env_var('SNOWFLAKE_ROLE') }}"
database: "{{ env_var('SNOWFLAKE_DATABASE') }}"
warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE') }}"
schema: "{{ env_var('SNOWFLAKE_SCHEMA') }}"
threads: 1
client_session_keep_alive: True
This file is just the dbt profiles.yml file that gets copied into the workspace's /root/.dbt/profiles.yml. You should use environment variables for the credentials, which our system will inject into the workspace. Here are the important environment variables to use: