Skip to content

Maayan via Elementary: Add data contract tests for cpa_and_roas#901

Open
joostboon wants to merge 1 commit intomasterfrom
elementary-create-dbt-tests-20260326135413889688
Open

Maayan via Elementary: Add data contract tests for cpa_and_roas#901
joostboon wants to merge 1 commit intomasterfrom
elementary-create-dbt-tests-20260326135413889688

Conversation

@joostboon
Copy link
Copy Markdown
Collaborator

Data Contract Enforcement for cpa_and_roas\n\nAdds three categories of data contract tests to ensure data quality on this critical finance/marketing model:\n\n### 1. Freshness — dbt_utils.recency\n- Ensures the day column contains data from at least the last 1 day\n- Catches stale data from missed pipeline runs\n\n### 2. Completeness — not_null on all columns\n- day, utm_source, total_spend, attribution_points, attribution_revenue, cost_per_acquisition, return_on_advertising_spend\n- Prevents null values from propagating to downstream dashboards\n\n### 3. Uniqueness — dbt_utils.unique_combination_of_columns\n- Composite key: (day, utm_source)\n- Prevents double-counted spend or revenue from duplicate rows

Created by: maayan+172@elementary-data.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant