Identify stores whose actual inventory differs from the expected shipment-plan quantity for a given item. Six prompts that build and materialize inventory_shipment_variance into your dev schema.
Inventory misallocation scenario walkthrough. Six steps, ~90 seconds.
Operations needs to know which stores received the wrong stock allocation ahead of a sale event. Some stores received too much, some too little, against the expected per-store shipment quantity.
You build a dbt model that lists every store/item where actual inventory differs from expected, and materialize it to your dev schema.
inventory_shipment_variance materialized in your dev schema. One row per misallocated store/item with actual count, expected count, variance quantity, and variance direction.
Copy each prompt as written, or rephrase. In Step 2, substitute the specific item and expected quantity the instructor provides.
Locate the inventory, store, item, and shipment models.
Find the models in this project related to inventory, stores, items, and shipments.
Then ask for the grain and joins.
For those models, show the grain, key columns, and how they join together.
Confirm the data can answer the question before writing SQL. Grain mismatches and missing join keys are common silent failures.
Check [specific item] shipments and inventory. Expected quantity is [N] per store. Show the per-store expected quantity, actual inventory, variance quantity, and variance direction, ordered by absolute variance desc, warehouse_id.
Inspect real rows for one item across the affected stores. Capture the over-counted and under-counted store identifiers; Step 5 checks they appear in the preview.
Create a dbt model named inventory_shipment_variance that lists every store where actual inventory for that item differs from the expected per-store quantity. Include store name, city or region, item name, actual inventory count, expected count, variance quantity, and a variance direction showing over-count or under-count.
dbt Wizard writes inventory_shipment_variance.sql into the project.
Compile the model and preview the first 20 rows using deterministic ordering. Order inventory variances by abs(variance_quantity) desc, warehouse_id, product_id.
The SQL compiles, the first 20 rows render in deterministic order, nothing lands in the warehouse. Confirm the stores from Step 3 appear, the columns are present, and the row count is non-zero.
Before materializing, confirm the active dbt target, the dev schema, and permission to create the model. Then materialize inventory_shipment_variance into my dev schema as a table. For this timed lab, skip extended verification after the successful compile and deterministic preview. Materialize only after the expected rows appear.
dbt Wizard runs the build against your dev schema (dev_lab_user_N). The instructor drops dev schemas after the lab via a cleanup script.
inventory_shipment_variance - one row per misallocated store/item with actual count, expected count, variance quantity, and variance direction. Materialized in the attendee's dev schema.
Skill definition, prompts, and instructor notes for scenario 1.
Every prompt in this scenario, formatted for print.
Extend an existing intermediate model with a new Fivetran-synced source. Three paths.