Skip to content

Commit

Permalink
Merge pull request #614 from elementary-data/ele-2037-add-deprecated-…
Browse files Browse the repository at this point in the history
…columns-to-alerts_dbt_source_freshness-due-to

ELE-2037: Add old columns to `alert_dbt_source_freshness` for backward compatability
  • Loading branch information
dapollak authored Nov 26, 2023
2 parents b234a2f + f45b9cd commit f6d1449
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion models/edr/alerts/alerts_dbt_source_freshness.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ select
sources.meta,
sources.owner,
sources.package_name,
sources.path
sources.path,
-- These columns below are deprecated. We add them since this view
-- was used to be loaded into an incremental model with those columns, their names were later changed
-- and Databricks doesn't respect `on_schema_change = 'append_new_columns'` properly, as described here -
-- https://docs.databricks.com/en/delta/update-schema.html#automatic-schema-evolution-for-delta-lake-merge
results.error_after as freshness_error_after,
results.warn_after as freshness_warn_after,
results.filter as freshness_filter
from results
join sources on results.unique_id = sources.unique_id
where {{ not elementary.get_config_var('disable_source_freshness_alerts') }} and lower(status) != 'pass'

0 comments on commit f6d1449

Please sign in to comment.