0
0
dbtdata~20 mins

Cross-team model sharing in dbt - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cross-team Model Sharing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Cross-team Model Dependencies in dbt

In dbt, when multiple teams share models, how can one team ensure their models correctly depend on models from another team?

ABy referencing the other team's models using the full project and schema name in the ref function, like ref('project_name', 'model_name')
BBy copying the other team's models into their own project to avoid dependencies
CBy using the ref function with only the model name, assuming dbt will find it automatically across projects
DBy manually writing SQL joins without using ref to avoid cross-project references
Attempts:
2 left
💡 Hint

Think about how dbt resolves model references across different projects.

data_output
intermediate
2:00remaining
Output of Cross-project Model Reference in dbt

Given two dbt projects: team_a and team_b. Team B's model sales_summary references Team A's model raw_sales using ref('team_a', 'raw_sales'). What will be the compiled SQL schema and table name for raw_sales in Team B's compiled SQL?

AThe compiled SQL will reference <code>public.raw_sales</code> by default.
BThe compiled SQL will reference <code>team_b.raw_sales</code> ignoring the project name in ref.
CThe compiled SQL will fail to compile due to cross-project reference errors.
DThe compiled SQL will reference <code>team_a.raw_sales</code> with the schema and table name as defined in Team A's project configuration.
Attempts:
2 left
💡 Hint

Consider how dbt compiles references across projects.

🔧 Debug
advanced
2:00remaining
Debugging Cross-team Model Reference Failure

Team B tries to run a model referencing Team A's model using ref('team_a', 'customer_data') but gets an error: Compilation Error: model 'team_a.customer_data' not found. What is the most likely cause?

ATeam B's dbt version is incompatible with Team A's dbt version.
BThe model name <code>customer_data</code> is misspelled in Team B's ref call.
CTeam A's project is not included as a dependency in Team B's <code>packages.yml</code> file.
DTeam B's model is missing a <code>schema.yml</code> file.
Attempts:
2 left
💡 Hint

Think about how dbt knows about other projects' models.

visualization
advanced
2:00remaining
Visualizing Cross-team Model Dependencies

You have two dbt projects: finance and marketing. Finance models depend on marketing models. Which visualization best represents the dependency graph showing cross-team model sharing?

AA pie chart showing the percentage of models per team.
BA directed graph where nodes represent models, edges show dependencies, and edges crossing project boundaries are highlighted in a different color.
CA bar chart showing the number of models per project without dependencies.
DA scatter plot of model run times versus model sizes.
Attempts:
2 left
💡 Hint

Think about how to show relationships and dependencies clearly.

🚀 Application
expert
3:00remaining
Implementing Cross-team Model Sharing with Version Control

Your organization wants to share dbt models across teams with strict version control. Which approach best supports this goal?

APublish shared models as a versioned dbt package in a private repository, and have consuming teams specify exact package versions in their <code>packages.yml</code>.
BDisable dbt's dependency management and manually manage SQL files across teams.
CUse a shared database schema for all teams without versioning, relying on communication to manage changes.
DCopy shared models into each team's project and update manually when changes occur.
Attempts:
2 left
💡 Hint

Consider how to manage versions and dependencies cleanly in dbt.