---
title: Hash Algorithm (Project)
description: Hash Algorithm (HashAlgorithm) selects the hash function for every key hash and row hash of a project, such as Hub_HK and BG_RowHash.
---

[Skip to content](https://knowledge.bigenius-x.com/hash-algorithm-project#main-content)

[Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en) [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal?hsLang=en)

[![TRI\_Logo\_biGENIUS\_2020\_RGB\_s](https://knowledge.bigenius-x.com/hs-fs/hubfs/Marketing/TRI_Logo_biGENIUS_2020_RGB_s.png?width=150&height=42&name=TRI_Logo_biGENIUS_2020_RGB_s.png)](https://www.bigenius-x.com/)

Open main navigation

Close main navigation

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new)
- [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [biGENIUS-X Knowledge Base](https://knowledge.bigenius-x.com/?hsLang=en)
2. [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en)
3. [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)

# Hash Algorithm (Project)

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

Hash Algorithm (`HashAlgorithm`) selects the hash function for every key hash and row hash of a project, such as Hub\_HK and BG\_RowHash. Set it in [Project Settings](https://knowledge.bigenius-x.com/manage-project-settings-and-generator-configuration?hsLang=en), Additional Settings, Hashing group, before the first load.

Stage projects have no Hash Algorithm.

### Values and defaults

![Hashing group of Project Settings with Hash Algorithm SHA1, Hash Casing None, Hash Concatenation Separator \_, Hash Null Placeholder \_NULL\_ and Hash Trim cleared](https://knowledge.bigenius-x.com/hs-fs/hubfs/knowledge_base_screenshots/hash-algorithm-project-settings-hashing.png?width=558&height=300&name=hash-algorithm-project-settings-hashing.png)

| Platform | Values | Default | Default hash type |
| --- | --- | --- | --- |
| Microsoft SQL Server | `SHA2_256`, `SHA1`, `MD5` | `SHA1` | `binary(20)` |
| Fabric Warehouse | `SHA2_256`, `SHA1`, `MD5` | `SHA1` | `varbinary(20)` |
| Oracle | `SHA1`, `MD5`, `SHA256`, `SHA384`, `SHA512` | `SHA1` | `RAW(20)` |
| Snowflake, Snowflake dbt | `HASH`, `SHA2-256`, `MD5` | `SHA2-256` | `BINARY(32)` |
| Databricks, Databricks dbt, Fabric Lakehouse | `SHA-256` | `SHA-256` | `binary` |

### Data type of the hash terms

The data types of the hash Default Terms do not change with the algorithm. When you select another algorithm, set the data type of each hash Default Term in [Manage Default Terms](https://knowledge.bigenius-x.com/manage-default-terms?hsLang=en). The change applies to every model object of the project. The hash Default Terms are `Hub_HK`, `Link_HK`, `DVLINK_ForeignKey_Identity`, `DrivingKeyLink_HK`, `PIT_HK`, `DVPIT_ForeignKey_Identity`, `BG_RowHash`, `BG_RowHashScd1` and `BG_RowHashScd2`.

Set the data type that matches the algorithm:

| Platform | Hash Algorithm | Data type |
| --- | --- | --- |
| Microsoft SQL Server | `MD5` | `binary(16)` |
| Microsoft SQL Server | `SHA1` | `binary(20)` |
| Microsoft SQL Server | `SHA2_256` | `binary(32)` |
| Fabric Warehouse | `MD5` | `varbinary(16)` |
| Fabric Warehouse | `SHA1` | `varbinary(20)` |
| Fabric Warehouse | `SHA2_256` | `varbinary(32)` |
| Oracle | `MD5` | `RAW(16)` |
| Oracle | `SHA1` | `RAW(20)` |
| Oracle | `SHA256` | `RAW(32)` |
| Oracle | `SHA384` | `RAW(48)` |
| Oracle | `SHA512` | `RAW(64)` |
| Snowflake, Snowflake dbt | `HASH` | `NUMBER(19,0)` |
| Snowflake, Snowflake dbt | `MD5` | `BINARY(16)` |
| Snowflake, Snowflake dbt | `SHA2-256` | `BINARY(32)` |
| Databricks, Databricks dbt, Fabric Lakehouse | `SHA-256` | `binary` |

These data types also hold the result:

- Microsoft SQL Server: `binary` or `varbinary` of that length or longer, or `varbinary(max)`.
- Fabric Warehouse: `varbinary` of that length or longer, or `varbinary(max)`.
- Oracle: `RAW` of that length or longer.
- Snowflake, Snowflake dbt with `HASH`: `INTEGER`, or `NUMBER` with scale 0 and a precision of 19 or more, or without precision.
- Snowflake, Snowflake dbt with `MD5` or `SHA2-256`: `BINARY` of that length or longer, or without a length.
- Databricks, Databricks dbt, Fabric Lakehouse: `string`, `varchar(64)` or longer, or `char(64)`. These hold the hash as a hexadecimal string of 64 characters.

### Effect on generated output

With `SHA2_256` on Microsoft SQL Server, a Satellite row hash is:

```
CAST(HASHBYTES('SHA2_256', CAST('' AS VARCHAR(MAX))
    + ISNULL([CUSTOMER], N'_NULL_')
    + N'_' + ISNULL([CUSTOMER_TYPE], N'_NULL_')
    + N'_' + ISNULL(CAST([CUSTOMER_SINCE] AS NVARCHAR(4000)),
        N'_NULL_'))
    AS VARBINARY(32)) AS [BG_RowHash]
```

The expression casts the result to `VARBINARY(32)`. The `BG_RowHash` column has the data type of its Default Term, for example `binary(32)`.

### Failure symptoms and recovery

#### The load fails after the algorithm was changed

Message: `String or binary data would be truncated in table '<table name>', column '<hash column>'` on Microsoft SQL Server, `ORA-12899: value too large for column` on Oracle  
Cause: the new result is longer than the data type of the hash column `<hash column>` of `<table name>`.  
Fix: set the data type of the hash Default Terms as listed in [Data type of the hash terms](https://knowledge.bigenius-x.com/hash-algorithm-project#data-type-of-the-hash-terms), then generate and deploy again.

#### The Hub load fails after the algorithm was changed

Message: `Violation of UNIQUE KEY constraint '<constraint name>'` on Microsoft SQL Server  
Cause: every `Hub_HK` changes, but the Hub already holds its business keys.  
Fix: reload all objects of the project.

Changing Hash Algorithm, Hash Concatenation Separator, Hash Null Placeholder, Hash Casing or Hash Trim changes the hash values that the generated loaders calculate. On objects that already hold data, the stored hash keys no longer match the new ones, and the next load treats the affected rows as changed. Change these settings before the first load, or plan a full reload of all objects of the project.

### Release differences

- Generator 2.2: Databricks and Fabric Lakehouse store hash values as `binary`. Up to Generator 2.0 they were `string`.
- Generator 2.4: the Snowflake default is `SHA2-256` with `BINARY(32)`. Up to Generator 2.3 it was `HASH` with a numeric type, see [Generators Release - 2.4.0](https://knowledge.bigenius-x.com/generators-release-2.4.0?hsLang=en).

### Related articles

- Reference: [Hash Concatenation Separator (Project)](https://knowledge.bigenius-x.com/hash-concatenation-separator-project?hsLang=en), [Hash Null Placeholder (Project)](https://knowledge.bigenius-x.com/hash-null-placeholder-project?hsLang=en), [Hash Casing (Project)](https://knowledge.bigenius-x.com/hash-casing-project?hsLang=en), [Hash Trim (Project)](https://knowledge.bigenius-x.com/hash-trim-project?hsLang=en), [Hash Group Size (Model Object)](https://knowledge.bigenius-x.com/hash-group-size-model-object?hsLang=en), [BG\_RowHash](https://knowledge.bigenius-x.com/bg_rowhash?hsLang=en), [BG\_RowHashScd1](https://knowledge.bigenius-x.com/bg_rowhashscd1?hsLang=en), [BG\_RowHashScd2](https://knowledge.bigenius-x.com/bg_rowhashscd2?hsLang=en), [Hub\_HK](https://knowledge.bigenius-x.com/hub_hk?hsLang=en), [Link\_HK](https://knowledge.bigenius-x.com/link_hk?hsLang=en), [DVLINK\_ForeignKey\_Identity](https://knowledge.bigenius-x.com/dvlink_foreignkey_identity?hsLang=en), [DrivingKeyLink\_HK](https://knowledge.bigenius-x.com/drivingkeylink_hk?hsLang=en), [PIT\_HK](https://knowledge.bigenius-x.com/pit_hk?hsLang=en), [DVPIT\_ForeignKey\_Identity](https://knowledge.bigenius-x.com/dvpit_foreignkey_identity?hsLang=en)
- See also: [How biGENIUS-X builds hash values](https://knowledge.bigenius-x.com/how-bigenius-x-builds-hash-values?hsLang=en), [Manage Default Terms](https://knowledge.bigenius-x.com/manage-default-terms?hsLang=en), [Manage Project settings and Generator configuration](https://knowledge.bigenius-x.com/manage-project-settings-and-generator-configuration?hsLang=en)

- [Getting started](https://knowledge.bigenius-x.com/getting-started?hsLang=en#main-content)

    - [Guidelines](https://knowledge.bigenius-x.com/getting-started?hsLang=en#guidelines)
    - [Start working](https://knowledge.bigenius-x.com/getting-started?hsLang=en#start-working)
    - [Account](https://knowledge.bigenius-x.com/getting-started?hsLang=en#account)
- [General overview](https://knowledge.bigenius-x.com/general-overview?hsLang=en)
- [Artificial Intelligence](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en)
- [Application Modules](https://knowledge.bigenius-x.com/application-modules?hsLang=en#main-content)

    - [Administration](https://knowledge.bigenius-x.com/application-modules?hsLang=en#administration)
    - [Solutions](https://knowledge.bigenius-x.com/application-modules?hsLang=en#solutions)
    - [Global Features](https://knowledge.bigenius-x.com/application-modules?hsLang=en#global-features)
    - [Projects](https://knowledge.bigenius-x.com/application-modules?hsLang=en#projects)
    - [Branches](https://knowledge.bigenius-x.com/application-modules?hsLang=en#branches)
    - [Data Connections](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-connections)
    - [Dataflow Modeling - Overview](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-overview)
    - [Dataflow Modeling - Wizard Steps](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-wizard-steps)
    - [Dataflow Modeling - Terms](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-terms)
    - [Dataflow Modeling - Term Mapping](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-term-mapping)
    - [Dataflow Modeling - Relationships](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-relationships)
    - [Dataflow Modeling - Data Quality](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-data-quality)
    - [Dataflow Modeling - Indexes](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-indexes)
    - [Relationship Modeling](https://knowledge.bigenius-x.com/application-modules?hsLang=en#relationship-modeling)
    - [Generate Artifacts](https://knowledge.bigenius-x.com/application-modules?hsLang=en#generate-artifacts)
    - [Project Settings](https://knowledge.bigenius-x.com/application-modules?hsLang=en#project-settings)
    - [Data Marketplace](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-marketplace)
- [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en#main-content)

    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Databricks dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks-dbt)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [Oracle](https://knowledge.bigenius-x.com/generators?hsLang=en#oracle)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Snowflake dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake-dbt)
    - [Artifacts](https://knowledge.bigenius-x.com/generators?hsLang=en#artifacts)
    - [Replace Placeholders](https://knowledge.bigenius-x.com/generators?hsLang=en#replace-placeholders)
    - [Target solution environment](https://knowledge.bigenius-x.com/generators?hsLang=en#target-solution-environment)
    - [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)
    - [Deployment with an Azure DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azure-devops-pipeline)
    - [Delta Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#delta-deployment)
    - [Load control environment](https://knowledge.bigenius-x.com/generators?hsLang=en#load-control-environment)
    - [Load data with a native load control](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-a-native-load-control)
    - [Load data with Apache Airflow](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-apache-airflow)
    - [Model Object Type](https://knowledge.bigenius-x.com/generators?hsLang=en#model-object-type)
    - [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)
    - [Default Terms](https://knowledge.bigenius-x.com/generators?hsLang=en#default-terms)
- [Discovery application](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#main-content)

    - [Discovery configurations](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#discovery-configurations)
- [Best practices](https://knowledge.bigenius-x.com/best-practices?hsLang=en#main-content)

    - [Modeling Approaches](https://knowledge.bigenius-x.com/best-practices?hsLang=en#modeling-approaches)
    - [Use Cases](https://knowledge.bigenius-x.com/best-practices?hsLang=en#use-cases)
    - [Business Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#business-rules)
    - [Data Quality Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#data-quality-rules)
- [FAQs](https://knowledge.bigenius-x.com/faqs?hsLang=en)
- [Product Release Notes](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#main-content)

    - [SaaS Application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#saas-application)
    - [Discovery application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#discovery-application)
    - [Generators](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#generators)
- [Legal Documents](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#main-content)

    - [Current legal docs](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#current-legal-docs)
    - [Software Product and Limits](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#software-product-and-limits)

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en)
- [Customer Portal](https://knowledge.bigenius-x.com/customer-portal)
- [Sign in](https://knowledge.bigenius-x.com/_hcms/mem/login)

[![biGENIUS logo](https://knowledge.bigenius-x.com/hubfs/TRI_Logo_biGENIUS_2020_RGB-1.svg "biGENIUS logo")](https://www.bigenius-x.com)

<https://www.linkedin.com/company/bigenius> <https://www.youtube.com/@biGENIUS_DWA>

All rights reserved © 2025, biGENIUS AG