0
0
dbtdata~10 mins

dbt Cloud deployment - Interactive Code Practice

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

Complete the code to specify the dbt Cloud job ID for deployment.

dbt
job_id = [1]
Drag options to blanks, or click blank then click option'
A'12345'
B12345
Cjob_id
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Using the job ID as a number without quotes.
Using an undefined variable instead of a string.
2fill in blank
medium

Complete the code to trigger a dbt Cloud job run using the API.

dbt
response = client.run_job(job_id=[1])
Drag options to blanks, or click blank then click option'
A'job_id'
Bjob_id
C12345
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the job ID as a string literal instead of variable.
Passing a number directly without variable.
3fill in blank
hard

Fix the error in the code to check if the dbt Cloud job run was successful.

dbt
if response.status_code == [1]:
    print('Run succeeded')
Drag options to blanks, or click blank then click option'
AOK
B'200'
CTrue
D200
Attempts:
3 left
💡 Hint
Common Mistakes
Comparing status_code to string '200' instead of integer 200.
Using boolean or string literals instead of numeric code.
4fill in blank
hard

Fill both blanks to create a dictionary with job ID and cause for triggering a run.

dbt
payload = [1]: [2]
Drag options to blanks, or click blank then click option'
A{'job_id'}
B'job_id'
C12345
D'Triggered by API'
Attempts:
3 left
💡 Hint
Common Mistakes
Using set notation instead of dictionary for keys.
Using numbers instead of descriptive strings for values.
5fill in blank
hard

Fill both blanks to create a dictionary comprehension filtering runs with status 'success'.

dbt
successful_runs = {run: run['id'] [1] run in runs if run['status'] [2] 'success'}
Drag options to blanks, or click blank then click option'
A['name']
B:
C==
D.get()
Attempts:
3 left
💡 Hint
Common Mistakes
Using '.' instead of ':' in dictionary comprehension.
Using '.get()' instead of direct key access.
Using '=' instead of '==' for comparison.