0
0
dbtdata~10 mins

dbt in CI/CD pipelines - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run dbt models in a CI pipeline.

dbt
dbt run --[1]
Drag options to blanks, or click blank then click option'
Aselect
Bmodels
Cexclude
Dtest
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--models' instead of '--select' which is the correct flag.
Using '--test' which runs tests, not models.
2fill in blank
medium

Complete the code to run dbt tests in a CI pipeline.

dbt
dbt [1] --select state:modified
Drag options to blanks, or click blank then click option'
Arun
Bbuild
Ctest
Dcompile
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' which runs models but does not run tests.
Using 'compile' which only compiles SQL but does not execute.
3fill in blank
hard

Fix the error in the GitHub Actions step to install dbt.

dbt
steps:
  - name: Install dbt
    run: pip [1] dbt-core
Drag options to blanks, or click blank then click option'
Ainstall
Bdownload
Cupdate
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'download' which is not a pip command.
Using 'remove' which uninstalls packages.
4fill in blank
hard

Fill both blanks to run dbt commands only if the previous step succeeded.

dbt
jobs:
  build:
    steps:
      - name: Run dbt models
        if: [1] == 'success'
        run: dbt [2]
Drag options to blanks, or click blank then click option'
Agithub.event_name
Btest
Cjob.status
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'github.event_name' which is not the job status.
Using 'test' instead of 'run' for dbt command.
5fill in blank
hard

Fill all three blanks to create a dbt job that installs dependencies, runs models, and tests.

dbt
steps:
  - name: Install dependencies
    run: pip [1] dbt-core
  - name: Run models
    run: dbt [2]
  - name: Run tests
    run: dbt [3]
Drag options to blanks, or click blank then click option'
Ainstall
Brun
Ctest
Dcompile
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'compile' instead of 'test' for the last step.
Forgetting to install dbt before running commands.