Complete the code to run dbt models in a CI pipeline.
dbt run --[1]The --select flag lets you specify which models to run in dbt.
Complete the code to run dbt tests in a CI pipeline.
dbt [1] --select state:modifiedThe dbt test command runs tests on your models.
Fix the error in the GitHub Actions step to install dbt.
steps:
- name: Install dbt
run: pip [1] dbt-coreTo install dbt in a CI step, use pip install dbt-core.
Fill both blanks to run dbt commands only if the previous step succeeded.
jobs:
build:
steps:
- name: Run dbt models
if: [1] == 'success'
run: dbt [2]The if condition checks if the job status is 'success'. Then it runs dbt run.
Fill all three blanks to create a dbt job that installs dependencies, runs models, and tests.
steps:
- name: Install dependencies
run: pip [1] dbt-core
- name: Run models
run: dbt [2]
- name: Run tests
run: dbt [3]First, install dbt with pip install. Then run models with dbt run. Finally, run tests with dbt test.
