A profile tells dbt how to connect to a warehouse: type, account, database, schema, credentials, threads. Profiles usually live in ~/.dbt/profiles.yml (or another path set by DBT_PROFILES_DIR).
Example sketch
my_analytics:
target: dev
outputs:
dev:
type: snowflake
account: xy12345
user: "{{ env_var('DBT_USER') }}"
password: "{{ env_var('DBT_PASSWORD') }}"
role: TRANSFORMER
database: ANALYTICS
warehouse: TRANSFORMING
schema: dbt_dev_alice
threads: 4
prod:
type: snowflake
# ... prod connection ...
schema: analytics
threads: 8How it links to the project
dbt_project.yml has profile: my_analytics. When you run dbt run --target prod, dbt loads the prod output from that profile.
dbt_project.yml profiles.yml ---------------- --------------- name, folders, warehouse type, default configs credentials, profile: my_analytics → targets: dev/prod
Targets
A target is one named connection (often dev, ci, prod). Same project code, different schemas/databases.
Interview tip: "Project config is shared in git; profiles are per-developer or per-CI secret. Prefer env_var for passwords so secrets never sit in plaintext YAML."