fix(recovery): restore source removed by production documentation merge
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- SERVING (BI-P003). What a dashboard or a BI-P028 metric reads.
|
||||
--
|
||||
-- Reads INTERMEDIATE only. Reading a source here would skip two layers, and
|
||||
-- assertLayerDependenciesLegal refuses that against the manifest graph.
|
||||
{{ config(materialized='table', tags=['tier:SERVING']) }}
|
||||
|
||||
select
|
||||
tenant_id,
|
||||
date_trunc('day', invoiced_at) as day,
|
||||
country_code,
|
||||
channel,
|
||||
segment,
|
||||
count(*) as order_count,
|
||||
sum(amount_sek) as net_revenue_sek
|
||||
from {{ ref('int_sales_enriched') }}
|
||||
where channel != 'internal' -- matches the net_revenue metric's baked filter
|
||||
group by 1, 2, 3, 4, 5
|
||||
@@ -0,0 +1,19 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: mart_sales_daily
|
||||
description: >
|
||||
SERVING projection behind the `net_revenue` and `orders` metrics.
|
||||
A blocking test failure here quarantines the serving projection
|
||||
(BI-P025); the quarantine is enforced on the READ side.
|
||||
columns:
|
||||
- name: tenant_id
|
||||
tests: [not_null]
|
||||
- name: day
|
||||
tests: [not_null]
|
||||
- name: net_revenue_sek
|
||||
tests: [not_null]
|
||||
- name: order_count
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_utils.accepted_range: { min_value: 1, inclusive: true }
|
||||
Reference in New Issue
Block a user