Course contents

The Analytics Engineer’s Field Guidedbt 3: ship it like a teamChallenge: dbt 3

Challenge: dbt 3

Challenge: dbt 3

Three situations from a team's daily workflow, from your sandbox to the merge request.

Challenge questions

  1. With the lesson's generate_schema_name, Alice builds stg_orders (folder +schema: staging) and fct_orders (+schema: marts) with target userland, whose schema is dbt_alice. Where do they land?

    1. USERLAND.STAGING and USERLAND.MARTS
    2. Both in USERLAND.dbt_alice, side by side
    3. USERLAND.dbt_alice_staging and dbt_alice_marts
    4. PROD_DB.STAGING and PROD_DB.MARTS
  2. Alice formats with a sqlfmt she installed globally months ago, and pre-commit isn't installed in her clone. CI's check_format, pinned to 0.27.0, fails on files she has just formatted. What's going on?

    1. CI ignores pyproject.toml and applies a line_length of 88
    2. CI checks the pro branch, which still has the old files
    3. Her older sqlfmt formats differently; use the pinned 0.27.0
    4. --check also lints SQL logic, which her formatter skipped
  3. The marts folder sets +query_tag to team finance in dbt_project.yml. Alice builds fct_orders in her userland all week, and finance asks why their cost line went up. What's going on?

    1. Her runs carry the same tag, so split the report by warehouse_name: she's on DEV_WH
    2. dbt only sets query tags on the pro target, so her credits can't be in finance's line
    3. The tag on her profile target replaces the folder's tag, so her runs are labelled as hers
    4. Snowflake bills her sandbox to USERLAND_ROLE, so the tag on her runs is ignored