Skip to content
  • There are no suggestions because the search field is empty.

BG_RowHashScd2

Applies to
Platform: Microsoft SQL Server · Snowflake · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle
Architecture: Data Store · Dimensional · Data Mart

BG_RowHashScd2 is the hash of the SCD2 terms of a row. The loader compares it with the stored value of the current version and writes a new version of the business key when it differs.

Objects that carry it

Store Entity, Entity and Mart Dimension. The term exists only when the object has at least one SCD2 term and Delta Detection is Hash Value Comparison, the default. With Column Comparison, the loader compares the columns and the object has no row hash.

Value

The hash covers the SCD2 terms in the term order of the object. Business keys, identity terms, Default Terms and SCD0 terms are never part of it. It uses the project Hash Algorithm; how the values are prepared and joined is explained in How biGENIUS-X builds hash values. On Oracle, Hash Group Size can build it from group hashes.

You cannot edit or map BG_RowHashScd2.

Data type

  • Microsoft SQL Server: binary(20)
  • Fabric Warehouse: varbinary(20)
  • Oracle: RAW(20)
  • Snowflake: BINARY(32)
  • Databricks, Databricks dbt and Fabric Lakehouse: binary

Example

A Store Entity on Microsoft SQL Server has the SCD2 terms ADDRESS_LINE1, ADDRESS_LINE2, ADDRESS_LINE3, ZIP_CODE, COUNTRY and COUNTRY_ISO_CODE, with default hash settings. Its Hashing view calculates:

CAST(HASHBYTES('SHA1', CAST('' AS VARCHAR(MAX))
    + ISNULL([ADDRESS_LINE1], N'_NULL_')
    + N'_' + ISNULL([ADDRESS_LINE2], N'_NULL_')
    + N'_' + ISNULL([ADDRESS_LINE3], N'_NULL_')
    + N'_' + ISNULL([ZIP_CODE], N'_NULL_')
    + N'_' + ISNULL([COUNTRY], N'_NULL_')
    + N'_' + ISNULL([COUNTRY_ISO_CODE], N'_NULL_'))
    AS VARBINARY(20)) AS [BG_RowHashScd2]

The customer with CUSTOMER_ID 1 moves from Main Street 1 to Main Street 3 in the second load, which runs at 2026-10-27 11:00. The Store Entity keeps the first version and adds a second one. BG_ValidFromTimestamp shows where each version starts, the first at Begin of Universe:

Valid from        ADDRESS_LINE1  BG_RowHashScd2
1900-01-01 00:00  Main Street 1  0xF62D7D26FFFBB09EC9034571E1298843976B12B9
2026-10-27 11:00  Main Street 3  0x9E6E0885ADAED4CD27212E2F0C82E617ED8159A8

Release differences

  • Generator 2.2: Databricks and Fabric Lakehouse use binary. Up to Generator 2.0 the type was string.
  • Generator 2.4: Snowflake uses BINARY(32). Up to Generator 2.3 the type was numeric.

Related articles