Bird
0
0

Given this dbt model SQL for source table products:

medium📝 Predict Output Q4 of 15
dbt - Project Organization
Given this dbt model SQL for source table products:
select id, name from {{ source('inventory', 'products') }}
What will be the output if the source table has 3 rows with ids 1, 2, 3?
AA table with only the id column.
BA table with 3 rows showing id and name columns.
CAn empty table because no filter is applied.
DAn error because source function is used incorrectly.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the query

    The query selects id and name columns from the source table products which has 3 rows.
  2. Step 2: Predict output

    Since no filters or errors, output will be 3 rows with id and name columns.
  3. Final Answer:

    A table with 3 rows showing id and name columns. -> Option B
  4. Quick Check:

    Simple select from source returns all rows [OK]
Quick Trick: Selecting from source returns all matching rows [OK]
Common Mistakes:
MISTAKES
  • Assuming source function causes error
  • Thinking no filter means empty output
  • Expecting only one column returned

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes