You maintain the global finance dbt project for a retailer that sells through three regional storefronts: North America (USD), the EU (EUR) and APAC (JPY and AUD). The CFO's board pack reads revenue_by_fiscal_quarter, which reports net revenue in USD by region and fiscal quarter. The extract covers orders from November 2025 to March 2026, but the latest build is wrong in ways nobody can explain. Every region has a row for FY2026-Q1, a quarter that closed in April 2025. APAC's FY2026-Q4 shows exactly $1.00 from a ¥15,000 order. EU revenue runs a few percent above what the EU finance team booked, even in months where the exchange rate is not in question.
The project mixes SQL and Jinja. Three regional order seeds and a monthly FX seed feed four staging models. int_orders_unioned stacks the regions, and int_orders_usd computes net revenue in USD through the to_major_units() macro. The mart labels each order with the fiscal_quarter() macro, which reads the fiscal_year_start_month var from dbt_project.yml. There is no compiled-SQL viewer: to see what a model sends to DuckDB, you have to render the Jinja in your head.