Skip to content

Maayan via Elementary: feat: Add test coverage for cpa_and_roas (JSO-40)#903

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

Maayan via Elementary: feat: Add test coverage for cpa_and_roas (JSO-40)#903
joostboon wants to merge 1 commit intomasterfrom
elementary-create-dbt-tests-20260326175118894433

Conversation

@joostboon
Copy link
Copy Markdown
Collaborator

JSO-40: Test coverage on cpa_and_roas

This PR enforces a data contract on the cpa_and_roas table with the following tests:

Freshness

  • dbt_utils.recency on day column – ensures data is updated up until yesterday

Completeness (no empty values)

  • not_null on all 7 columns: day, utm_source, attribution_points, attribution_revenue, total_spend, cost_per_acquisition, return_on_advertising_spend

Uniqueness (no duplications)

  • dbt_utils.unique_combination_of_columns on (day, utm_source) – validates the natural grain of the table

Anomaly detection on key business KPIs

  • elementary.column_anomalies on cost_per_acquisition (average)
  • elementary.column_anomalies on attribution_revenue (average)

All new tests are set to severity warning.

Resolves: JSO-40

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