Models Flashcards
(48 cards)
Which dbt YAML file does not support Jinja?
dependencies.yml
In which dbt YAML files can you use vars?
Any YAML file that supports Jinja, like schema.yml and snapshots.yml
How do you pass vars to dbt_project.yml, packages.yml, and profiles.yml?
Through the CLI using –vars
Why can’t you define vars inside dbt_project.yml, packages.yml, and profiles.yml?
These files are parsed before Jinja is rendered
Can you use env_var() in YAML files that support Jinja?
Yes
Which dbt YAML files support secure environment variables with DBT_ENV_SECRET_?
profiles.yml and packages.yml
Which dbt package generates YML and SQL files for models and sources?
dbt_codegen
Which dbt package provides macros like date_spine for development?
dbt_utils
Which package evaluates your dbt project against best practices?
dbt_project_evaluator
Which package offers additional tests beyond dbt’s built-in ones?
dbt_expectations
Which package helps compare outputs of two queries for refactoring?
dbt_audit_helper
Which package tracks dbt run performance over time?
dbt_artifacts
Which package ensures your dbt project is tested and documented?
dbt_meta_testing
What is a resilient way to select models in dbt?
Use folder structure, e.g., dbt build –select marts.marketing
How should you group dbt jobs?
By build cadences and SLAs (hourly, daily, weekly)
How can you test a subset of records in dbt?
Use the ‘where’ config for tests
How can you examine failing test records in dbt?
Use ‘store_failures’
How do you set acceptable failure thresholds for dbt tests?
Use severity thresholds
What config optimizes incremental model behavior?
‘incremental_strategy’
Where do you set global defaults in dbt?
In dbt_project.yml using vars
How can you avoid repetition in Jinja code?
Use for loops
What is a better way to apply grants than post-hooks?
Use the grants config
How do you prevent reprocessing already transformed data?
Set source-freshness thresholds