Bird
Raised Fist0
dbtdata~20 mins

dbt Cloud deployment - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
dbt Cloud Deployment Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary purpose of dbt Cloud deployment?

Choose the main reason why teams use dbt Cloud deployment in their data projects.

ATo automate the execution of data transformations and manage version control.
BTo replace SQL with a new programming language for data analysis.
CTo store raw data from various sources in a data lake.
DTo create visual dashboards for business users without coding.
Attempts:
2 left
💡 Hint

Think about what dbt Cloud helps automate and manage in data workflows.

❓ Predict Output
intermediate
2:00remaining
Output of dbt run command in dbt Cloud

What is the expected output after successfully running dbt run in dbt Cloud?

dbt
Running with dbt=1.4.0
Found 3 models, 0 tests, 0 snapshots, 0 analyses, 0 macros

19:20:15 | Concurrency: 1 threads (target='dev')
19:20:15 | 
19:20:15 | 1 of 3 START table model my_model_a................ [RUN]
19:20:20 | 1 of 3 OK created table model my_model_a........... [SUCCESS 5s]
19:20:20 | 2 of 3 START table model my_model_b................ [RUN]
19:20:25 | 2 of 3 OK created table model my_model_b........... [SUCCESS 5s]
19:20:25 | 3 of 3 START table model my_model_c................ [RUN]
19:20:30 | 3 of 3 OK created table model my_model_c........... [SUCCESS 5s]
19:20:30 | 
19:20:30 | Finished running 3 table models in 15.0s.
ANo output is shown after running the command.
BAn error message indicating missing dependencies for models.
CA warning about deprecated syntax but models still run.
DAll models run successfully with messages showing start and success times for each model.
Attempts:
2 left
💡 Hint

Look for messages indicating model execution status.

❓ data_output
advanced
2:00remaining
Result of a dbt test run with failing tests

Given the following dbt test output, how many tests failed?

Running with dbt=1.4.0
Found 2 tests, 0 models

19:45:10 | 1 of 2 START test not_null_test on column user_id in model users [RUN]
19:45:12 | 1 of 2 FAIL not_null_test on column user_id in model users [FAIL]
19:45:12 | 2 of 2 START test unique_test on column email in model users [RUN]
19:45:14 | 2 of 2 PASS unique_test on column email in model users [PASS]
19:45:14 | 
19:45:14 | Finished running 2 tests in 4.0s.
19:45:14 | 1 FAIL, 1 PASS
ABoth tests failed.
B1 test failed and 1 test passed.
CBoth tests passed successfully.
DNo tests were run.
Attempts:
2 left
💡 Hint

Check the lines with PASS and FAIL keywords.

🔧 Debug
advanced
2:00remaining
Identify the error in this dbt Cloud deployment YAML snippet

What error will occur when deploying this dbt_project.yml snippet?

name: my_project
version: '1.0'
config-version: 2
profile: my_profile
source-paths:
  - models
target-path: target
clean-targets:
  - target
  - dbt_modules
models:
  my_project:
    +materialized: table
    staging:
      +materialized: view
    marts:
      +materialized: incremental
      +incremental_strategy: delete+insert
AKeyError because 'models' key is missing.
BNo error; the YAML is valid and deploys successfully.
CSyntaxError due to invalid incremental_strategy value 'delete+insert'.
DTypeError because version is a string instead of a number.
Attempts:
2 left
💡 Hint

Check the allowed values for incremental_strategy in dbt documentation.

🚀 Application
expert
2:00remaining
Analyzing dbt Cloud deployment logs for performance bottlenecks

You have the following dbt Cloud run log snippet:

19:30:00 | 1 of 4 START table model sales................ [RUN]
19:30:30 | 1 of 4 OK created table model sales........... [SUCCESS 30s]
19:30:30 | 2 of 4 START table model customers............ [RUN]
19:30:32 | 2 of 4 OK created table model customers....... [SUCCESS 2s]
19:30:32 | 3 of 4 START table model products............. [RUN]
19:31:32 | 3 of 4 OK created table model products........ [SUCCESS 60s]
19:31:32 | 4 of 4 START table model orders............... [RUN]
19:31:35 | 4 of 4 OK created table model orders.......... [SUCCESS 3s]
19:31:35 | Finished running 4 table models in 95.0s.

Which model is the main performance bottleneck in this deployment?

Aproducts model, because it took 60 seconds to run.
Bsales model, because it started first.
Corders model, because it finished last.
Dcustomers model, because it took 2 seconds.
Attempts:
2 left
💡 Hint

Look at the time each model took to run.

Practice

(1/5)
1. What is the main purpose of dbt Cloud deployment?
easy
A. To automate running data transformations in the cloud
B. To write SQL queries manually every time
C. To store raw data without processing
D. To create dashboards for data visualization

Solution

  1. Step 1: Understand dbt Cloud deployment

    dbt Cloud deployment is designed to automate the running of data transformation commands in a cloud environment.
  2. Step 2: Compare options with purpose

    Only To automate running data transformations in the cloud describes automation of data transformations in the cloud, which matches the main purpose.
  3. Final Answer:

    To automate running data transformations in the cloud -> Option A
  4. Quick Check:

    dbt Cloud deployment = automate transformations [OK]
Hint: Remember: dbt Cloud runs your data jobs automatically [OK]
Common Mistakes:
  • Confusing deployment with manual query writing
  • Thinking dbt Cloud is for raw data storage only
  • Mixing deployment with visualization tools
2. Which of the following is the correct way to schedule a job in dbt Cloud UI?
easy
A. Upload SQL files to the cloud storage
B. Write a Python script to run dbt commands
C. Manually run dbt commands every hour
D. Set a cron expression to run commands automatically

Solution

  1. Step 1: Identify scheduling method in dbt Cloud

    dbt Cloud UI allows scheduling jobs using cron expressions to automate command runs.
  2. Step 2: Eliminate incorrect options

    Options B, C, and D do not describe scheduling via the UI; only "Set a cron expression to run commands automatically" correctly describes cron scheduling.
  3. Final Answer:

    Set a cron expression to run commands automatically -> Option D
  4. Quick Check:

    Scheduling in dbt Cloud = cron expression [OK]
Hint: Scheduling uses cron expressions in dbt Cloud UI [OK]
Common Mistakes:
  • Confusing manual runs with scheduled jobs
  • Thinking Python scripts are needed for scheduling
  • Assuming uploading files schedules jobs
3. Given this dbt Cloud job configuration:
commands:
  - dbt run
schedule: '0 2 * * *'

What does this job do?
medium
A. Runs dbt seed command once a week
B. Runs dbt tests every hour
C. Runs dbt transformations every day at 2 AM
D. Runs dbt run command manually

Solution

  1. Step 1: Interpret the schedule cron expression

    The cron '0 2 * * *' means the job runs daily at 2:00 AM.
  2. Step 2: Identify the command being run

    The command is 'dbt run', which runs data transformations.
  3. Final Answer:

    Runs dbt transformations every day at 2 AM -> Option C
  4. Quick Check:

    dbt run + daily 2 AM = Runs dbt transformations every day at 2 AM [OK]
Hint: Cron '0 2 * * *' means daily at 2 AM [OK]
Common Mistakes:
  • Misreading cron schedule as hourly or weekly
  • Confusing 'dbt run' with 'dbt test' or 'dbt seed'
  • Assuming manual run instead of scheduled
4. You set up a dbt Cloud job with this schedule:
schedule: '60 2 * * *'

What is the problem with this schedule?
medium
A. The hour value 2 is invalid in cron syntax
B. The minute value 60 is invalid in cron syntax
C. The schedule runs too frequently
D. There is no problem; it is valid

Solution

  1. Step 1: Check cron minute value

    Cron minutes must be between 0 and 59; 60 is invalid.
  2. Step 2: Check cron hour value

    Hour 2 is valid (0-23), so the problem is the minute value.
  3. Final Answer:

    The minute value 60 is invalid in cron syntax -> Option B
  4. Quick Check:

    Cron minute max = 59, 60 invalid [OK]
Hint: Cron minutes max 59, hours max 23 [OK]
Common Mistakes:
  • Focusing on the hour value instead of the minute
  • Assuming schedule is valid without checking ranges
  • Thinking frequent runs cause syntax errors
5. You want to deploy a dbt Cloud job that runs tests after transformations finish successfully. Which setup achieves this?
hard
A. Create two jobs: one runs 'dbt run', second runs 'dbt test' triggered after first succeeds
B. Create one job with commands: 'dbt test' then 'dbt run'
C. Schedule 'dbt run' and 'dbt test' to run at the same time
D. Run 'dbt test' only, skipping 'dbt run'

Solution

  1. Step 1: Understand job dependencies

    Tests should run only after transformations succeed to validate results.
  2. Step 2: Setup jobs with triggers

    Creating two jobs with the second triggered after the first ensures correct order.
  3. Step 3: Eliminate incorrect options

    Create one job with commands: 'dbt test' then 'dbt run' runs tests before transformations, C runs both simultaneously, D skips transformations.
  4. Final Answer:

    Create two jobs: one runs 'dbt run', second runs 'dbt test' triggered after first succeeds -> Option A
  5. Quick Check:

    Test after run = two jobs with trigger [OK]
Hint: Use job triggers to run tests after transformations [OK]
Common Mistakes:
  • Running tests before transformations
  • Scheduling jobs to run simultaneously
  • Skipping transformations before testing
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard