Skip to content

DBT: Schema Columns Snapshot

DBT model name: schema_columns_snapshot

Explore dependencies/lineage: link


Description

Stores the schema details for tables that are monitored with elementary schema changes test. In order to compare current schema to previous state, we must store the previous state. The data is from a view that queries the data warehouse information schema. This is an incremental table.


Details

Column Type Description

No data tests defined 🧐

Not referenced by any model or exposure.

Macros

  • get_config_var
  • get_default_table_type
  • get_default_incremental_strategy
  • empty_schema_columns_snapshot

No called script or script source not found.

{{
    config(
        materialized="incremental",
        unique_key="column_state_id",
        on_schema_change="append_new_columns",
        full_refresh=elementary.get_config_var("elementary_full_refresh"),
        meta={
            "timestamp_column": "created_at",
            "prev_timestamp_column": "detected_at",
        },
        table_type=elementary.get_default_table_type(),
        incremental_strategy=elementary.get_default_incremental_strategy(),
    )
}}

{{ elementary.empty_schema_columns_snapshot() }}