History Tables

History tables are one of the Slowly Changing Dimension (SCD) methods used in data warehousing. They allow you to keep track of changes to your data over time and are useful for auditing, debugging, and understanding how your data has evolved.

In Weld, history tables can be enabled for selected tables within the connector settings. When enabled, a history table is created with the same schema as the original table, but it includes recorded changes over time. In other words, each time a record in the original table is updated, a new entry is added to the history table with the previous state of the record.

Example: Customers Table with History Enabled

Current Table: customers

idnamephone_numberupdated_at
1Anna123-456-88882024-02-01 10:15:00

This table always contains the latest version of each record.

History Table: customers_history

idnamephone_numberupdated_at
1Anna123-456-78902024-01-01 09:00:00
1Anna123-456-88882024-02-01 10:15:00

This table stores previous versions of the record whenever changes occur.

Key Points

  • The history table has the same schema as the original table.
  • The main table always reflects the current state.
  • The history table allows you to see what the data looked like at any point in time.

How to Enable History Tables in Weld

  1. Go to the connector's configuration settings in Weld.
  2. Check the box saying "Include history tables".
  3. Search for the tables you want to enable history for and select them.
  4. Save the configuration and update the sync.
History Tables

Connectors Supporting History Tables in Weld

  • Shopify
  • Shopify Plus

Was this page helpful?