BankOrg Docs

In progress

BankOrg Data Platform / Data Modeling / Silver

Snapshots

Interactive physical model of the PRD_SILVER.SNAPSHOTS schema: the three dbt snapshots with their SCD Type 2 columns and relationships.

PRD_SILVER.SNAPSHOTS holds three tables, snp_branches, snp_customers and snp_accounts. dbt creates them with dbt snapshot over the staging views; no Snowflake script creates the tables. Pick a table in the explorer or on the canvas to see its columns and relationships.

Banking Data Architecture Explorer

drag tables · scroll to zoom

Compared with staging

  • Every column of the staging view is kept, with the same types, and dbt adds dbt_scd_id, dbt_updated_at, dbt_valid_from and dbt_valid_to.
  • A business key (branch_code, customer_id, account_id) can have several rows, one per version. The current version has dbt_valid_to empty; dbt_scd_id is unique for each version.
  • A new version opens only when row_hash changes. The hash of an account leaves out current_balance.
  • The PII columns of snp_customers and account_number of snp_accounts carry the PII tag, set by a dbt post-hook.

The configuration, the dimensions built from the snapshots and the tests are described in Silver.