---
title: Entity
description: An Entity stores data per business key in a Core layer table, with an integer surrogate key and the history of its SCD2 terms.
---

[Skip to content](https://knowledge.bigenius-x.com/create-an-entity#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. [Model Object Type](https://knowledge.bigenius-x.com/generators?hsLang=en#model-object-type)

# Entity

**Applies to**  
Platform: Microsoft SQL Server · Snowflake · Databricks · Fabric Lakehouse · Fabric Warehouse  
Architecture: Dimensional

An Entity stores data per business key in a Core layer table, with an integer surrogate key and the history of its SCD2 terms. Use it for the dimensions and reference data that Facts and other Entities reference. After each load, the result view shows one row per business key and version.

### Sources and relationships

An Entity reads [Stages](https://knowledge.bigenius-x.com/create-a-stage?hsLang=en), [Core Composites](https://knowledge.bigenius-x.com/create-a-core-composite?hsLang=en) and [Store Entities](https://knowledge.bigenius-x.com/create-a-store-entity?hsLang=en) of a linked Data Store project, in one or more dataflows.

- Relationships: an Entity can reference other Entities, and itself for a hierarchy. See [Use parent-child relationships](https://knowledge.bigenius-x.com/use-parent-child-relationships?hsLang=en).
- Readers: [Facts](https://knowledge.bigenius-x.com/create-a-fact?hsLang=en) and other Entities reference it. Mart Composites, Mart Dimensions and Mart Facts read it in a Dimensional and Mart project, or as a linked object in a Data Mart project.

### Create an Entity

- With the wizard: open the menu of a Stage, Core Composite or Store Entity, choose **Automate** and then **Create Entity**. The wizard gives the mapped terms the Historization Type SCD2. See [Create a Model Object with the wizard](https://knowledge.bigenius-x.com/create-a-model-object-with-the-wizard?hsLang=en).  
  ![Menu of a Stage with Automate and its entries Create Core Composite, Create Entity and Create Fact](https://knowledge.bigenius-x.com/hs-fs/hubfs/knowledge_base_screenshots/create-an-entity-automate-menu.png?width=400&height=290&name=create-an-entity-automate-menu.png)
- Manually: [create a model object](https://knowledge.bigenius-x.com/create-a-model-object?hsLang=en) of type Entity in the Dimensional column, [create a dataflow set](https://knowledge.bigenius-x.com/create-a-data-flow-set?hsLang=en), [add the source model objects](https://knowledge.bigenius-x.com/add-a-model-object-into-a-data-flow-set?hsLang=en) and [map the terms](https://knowledge.bigenius-x.com/map-a-source-term-with-a-target-term?hsLang=en). Mark at least one term as business key, and [add a relationship](https://knowledge.bigenius-x.com/add-a-relationship?hsLang=en) to each referenced Entity.

In both cases, set the [Historization Type](https://knowledge.bigenius-x.com/historization-type-term-and-relationship?hsLang=en) of the terms and relationships that are not SCD2.

### Historization

- SCD2 (default): a changed value starts a new version at the load timestamp.
- SCD1: a new value overwrites the term in every version of the business key.
- SCD0: the value of the first load is kept.

The first version of a business key starts at 1900-01-01 (Begin of Universe). A version ends where the next one starts; the current version ends at 9999-12-31 (End of Universe). When the terms mix Historization Types, validation reports the warning `uses mixed historization types`. The load still runs. See [Change detection and historization](https://knowledge.bigenius-x.com/change-detection-and-historization?hsLang=en).

### Properties

- [Implementation Type](https://knowledge.bigenius-x.com/implementation-type-model-object?hsLang=en): `Permanent` only, a table that keeps its rows from load to load.
- [Delta Detection](https://knowledge.bigenius-x.com/delta-detection-model-object?hsLang=en): `Hash Value Comparison` (default) compares row hashes. `Column Comparison` compares the SCD1 and SCD2 terms column by column.
- [Load Caching](https://knowledge.bigenius-x.com/load-caching-model-object?hsLang=en): no value (default) or `Hashing`, which stores the hashing view in a table before the loader runs.
- [Custom Singleton Values](https://knowledge.bigenius-x.com/custom-singleton-values-model-object?hsLang=en): values of the unknown-member row for selected terms.
- [Foreign Key Mode](https://knowledge.bigenius-x.com/foreign-key-mode-model-object?hsLang=en): foreign key constraints to the referenced Entities; default `Create Disabled`.
- [Deduplication Method](https://knowledge.bigenius-x.com/deduplication-method-model-object?hsLang=en) and [Sort Order within Partition](https://knowledge.bigenius-x.com/deduplication-partition-model-object?hsLang=en), per dataflow. `Partition` keeps one row per business key.

The project properties [Persist Validity](https://knowledge.bigenius-x.com/persist-validity-project?hsLang=en) and [Create Result Views](https://knowledge.bigenius-x.com/create-result-views-project?hsLang=en) decide whether `BG_ValidToTimestamp` is a table column and whether the result view exists.

### Default Terms

- `<model object name>_SK` ([`BG_Entity_Identity`](https://knowledge.bigenius-x.com/bg_entity_identity?hsLang=en)): the integer surrogate key and primary key.
- `<referenced Entity>_<role>_SK` ([`BG_Entity_ForeignKey_Identity`](https://knowledge.bigenius-x.com/bg_entity_foreignkey_identity?hsLang=en)): one per relationship, the surrogate key of the referenced Entity.
- [`BG_LoadTimestamp`](https://knowledge.bigenius-x.com/bg_loadtimestamp?hsLang=en) and [`BG_UpdateTimestamp`](https://knowledge.bigenius-x.com/bg_updatetimestamp?hsLang=en): the load that inserted the row and the load that last changed it.
- [`BG_SourceSystem`](https://knowledge.bigenius-x.com/bg_sourcesystem?hsLang=en): the source system of the row; empty unless you map it.
- [`BG_ValidFromTimestamp`](https://knowledge.bigenius-x.com/bg_validfromtimestamp?hsLang=en) and [`BG_ValidToTimestamp`](https://knowledge.bigenius-x.com/bg_validtotimestamp?hsLang=en): only when a term or relationship has SCD2. The business keys and `BG_ValidFromTimestamp` form a unique constraint.
- [`BG_EffectiveTimestamp`](https://knowledge.bigenius-x.com/bg_effectivetimestamp?hsLang=en): the point in time that selects the version of a referenced historized Entity.
- [`BG_RowHashScd1`](https://knowledge.bigenius-x.com/bg_rowhashscd1?hsLang=en) and [`BG_RowHashScd2`](https://knowledge.bigenius-x.com/bg_rowhashscd2?hsLang=en): hashes of the SCD1 and of the SCD2 terms, each only when such terms exist. Business keys, Default Terms and SCD0 terms are not hashed. See [How biGENIUS-X builds hash values](https://knowledge.bigenius-x.com/how-bigenius-x-builds-hash-values?hsLang=en).
- [`BG_DataQuality_ID`](https://knowledge.bigenius-x.com/bg-dataquality-id?hsLang=en), [`BG_ErrorCount`](https://knowledge.bigenius-x.com/bg_errorcount?hsLang=en) and [`BG_ErrorDescription`](https://knowledge.bigenius-x.com/bg_errordescription?hsLang=en): hidden terms of the data quality objects.

Deployment inserts an unknown-member row with the surrogate key -1, Unknown for text, 0 for numbers and 1900-01-01 for dates. A Fact or Entity row whose foreign key finds no match references this row.

### Generated objects

These are the names on Microsoft SQL Server for an Entity `loyaltycard` with one dataflow:

| Role | Generated name | Purpose |
| --- | --- | --- |
| Source | `CLS_EN_loyaltycard_Source` | Joins and maps the sources |
| Deduplication | `CLS_EN_loyaltycard_Deduplication` | Removes duplicate rows |
| Hashing | `COR_EN_loyaltycard_Hashing` | Calculates the row hashes |
| HashingStorage | `COR_EN_loyaltycard_HashingTable` | Stores the row hashes |
| HashingLoader | `COR_EN_loyaltycard_HashingLoader` | Fills the hashing table |
| Lookup | `COR_EN_loyaltycard_Lookup` | Finds referenced surrogate keys |
| Delta | `COR_EN_loyaltycard_Delta` | Selects new and changed rows |
| Loader | `COR_EN_loyaltycard_Loader` | Loads the table |
| Storage | `COR_EN_loyaltycard` | Entity table |
| Result | `COR_EN_loyaltycard_Result` | Query view with validity |

- `CLS_` objects are in the Cleanse layer, `COR_` objects in the Core layer. Loaders are stored procedures; the Entity table and the hashing table are tables; all other objects are views.
- The deduplication view exists only with a Deduplication Method other than `None`.
- The hashing view exists only with `Hash Value Comparison` and at least one SCD1 or SCD2 term. The hashing table and hashing loader exist only with Load Caching `Hashing`.
- A data quality rule that runs before the load adds `_DataQualityBeforeLoadAction`, `_DataQualityResult`, `_DataQualityTable` and `_DataQualityLoader` in the Cleanse layer. Rule logging adds `_DataQualityError`.
- With several dataflows, all objects except the table and the result view exist once per dataflow, with the dataflow name in their names.

With the default settings, the dependencies are:

```
sources -> CLS_EN_loyaltycard_Source -> _Hashing -> _Lookup
_Lookup -> _Delta -> _Loader -> COR_EN_loyaltycard -> _Result
_Result -> _Delta (comparison with the stored rows)
```

### Example

The Entity `loyaltycard` on Microsoft SQL Server reads the Stage `loyaltycard`. `LOYALTYCARD_ID` is the business key. The example uses these terms:

- `CUSTOMER_ID`: SCD2.
- `CARD_NUMBER`: SCD1.
- `IS_ACTIVE`: SCD0.

Load 1 on 2026-10-28 08:00 delivers card 500 (number 4711, customer 1, `IS_ACTIVE` 1) and card 501 (number 4712, customer 2, `IS_ACTIVE` 1). Load 2 on 2026-10-29 08:00 changes card 500 to number 4811, customer 3, `IS_ACTIVE` 0.

### Check the result

Query the result view, here in the schema `cor`:

```
SELECT loyaltycard_SK, LOYALTYCARD_ID, CARD_NUMBER, CUSTOMER_ID,
       IS_ACTIVE, BG_ValidFromTimestamp, BG_ValidToTimestamp
FROM cor.COR_EN_loyaltycard_Result
ORDER BY loyaltycard_SK;
```

This is the result after load 2, with shortened column names and timestamps:

```
SK  CARD_ID  CARD_NUMBER  CUSTOMER_ID  IS_ACTIVE  ValidFrom   ValidTo
-1  0        0            0            0          1900-01-01  9999-12-31
1   500      4811         1            1          1900-01-01  2026-10-29
2   501      4712         2            1          1900-01-01  9999-12-31
3   500      4811         3            1          2026-10-29  9999-12-31
```

- The new customer starts version 3 of card 500 at the load timestamp of load 2; version 1 keeps its surrogate key.
- Card number 4811 replaces 4711 in both versions, because `CARD_NUMBER` is SCD1.
- `IS_ACTIVE` stays 1, because SCD0 keeps the first value.
- Row -1 is the unknown-member row from the deployment.
- Repeating load 2 inserts and updates no row.

### Platform differences

- Persist Validity is on by default on Snowflake, Databricks, Fabric Lakehouse and Fabric Warehouse, and off on Microsoft SQL Server.
- Foreign Key Mode: Microsoft SQL Server offers `None`, `Create Disabled` and `Create Enforced`. Snowflake, Databricks and Fabric Warehouse offer `None` and `Create Disabled`. Fabric Lakehouse offers `None` only.
- Snowflake: names are in capitals. The load control task `LC_COR_EN_<MODEL OBJECT NAME>_TASK` calls the loader. The dataflow properties [Use Stream](https://knowledge.bigenius-x.com/use-stream-model-object?hsLang=en) and Warehouse Placeholder Variable Name apply.
- Databricks and Fabric Lakehouse: the loader is the notebook `COR_EN_<model object name>_Loader`. The properties [File Format](https://knowledge.bigenius-x.com/file-format-model-object?hsLang=en), [Optimization Method](https://knowledge.bigenius-x.com/optimization-method-model-object?hsLang=en), [Optimization Method Columns](https://knowledge.bigenius-x.com/optimization-method-columns-model-object?hsLang=en) and [Use Sequential Dataflow Execution](https://knowledge.bigenius-x.com/use-sequential-dataflow-execution-model-object?hsLang=en) apply.
- Fabric Warehouse: the deployment notebooks create the same objects as on Microsoft SQL Server. The loader assigns surrogate keys from the current maximum, without an identity column.

### Limitations

- An Entity has at least one business key and exactly one surrogate key term.
- Relationships between Entities must not form a cycle; a relationship of an Entity to itself is allowed.
- An aggregation must be defined in all dataflow sets or in none.
- A historized Entity needs Create Result Views or Persist Validity; otherwise validation reports an error.

### Release differences

- Generator 1.9: Load Caching is available on Snowflake, Databricks and Fabric Lakehouse.
- Generator 1.10: Load Caching is available on Microsoft SQL Server. Delta Detection is available as a project property, with `BG_RowHashScd1` and `BG_RowHashScd2`. `BG_DataQuality_ID` replaces `BG_Cleanse_ID`.
- Generator 2.0: Delta Detection is a model object property.
- Generator 2.2: Persist Validity and Create Result Views are available. Fabric Warehouse is available.
- Generator 2.3: Custom Singleton Values is available.

### Related articles

- Previous: [Stage](https://knowledge.bigenius-x.com/create-a-stage?hsLang=en), [Core Composite](https://knowledge.bigenius-x.com/create-a-core-composite?hsLang=en)
- Next: [Fact](https://knowledge.bigenius-x.com/create-a-fact?hsLang=en)
- Reference: [Historization Type (Term and Relationship)](https://knowledge.bigenius-x.com/historization-type-term-and-relationship?hsLang=en), [Implementation Type (Model Object)](https://knowledge.bigenius-x.com/implementation-type-model-object?hsLang=en), [Delta Detection (Model Object)](https://knowledge.bigenius-x.com/delta-detection-model-object?hsLang=en), [Load Caching (Model Object)](https://knowledge.bigenius-x.com/load-caching-model-object?hsLang=en), [Custom Singleton Values (Model Object)](https://knowledge.bigenius-x.com/custom-singleton-values-model-object?hsLang=en), [Foreign Key Mode (Model Object)](https://knowledge.bigenius-x.com/foreign-key-mode-model-object?hsLang=en), [Persist Validity (Project)](https://knowledge.bigenius-x.com/persist-validity-project?hsLang=en), [Create Result Views (Project)](https://knowledge.bigenius-x.com/create-result-views-project?hsLang=en), [BG\_Entity\_Identity](https://knowledge.bigenius-x.com/bg_entity_identity?hsLang=en), [BG\_Entity\_ForeignKey\_Identity](https://knowledge.bigenius-x.com/bg_entity_foreignkey_identity?hsLang=en), [BG\_EffectiveTimestamp](https://knowledge.bigenius-x.com/bg_effectivetimestamp?hsLang=en), [BG\_RowHashScd1](https://knowledge.bigenius-x.com/bg_rowhashscd1?hsLang=en), [BG\_RowHashScd2](https://knowledge.bigenius-x.com/bg_rowhashscd2?hsLang=en), [BG\_DataQuality\_ID](https://knowledge.bigenius-x.com/bg-dataquality-id?hsLang=en)
- See also: [Change detection and historization](https://knowledge.bigenius-x.com/change-detection-and-historization?hsLang=en), [How biGENIUS-X builds hash values](https://knowledge.bigenius-x.com/how-bigenius-x-builds-hash-values?hsLang=en), [Use parent-child relationships](https://knowledge.bigenius-x.com/use-parent-child-relationships?hsLang=en), [Create a Model Object with the wizard](https://knowledge.bigenius-x.com/create-a-model-object-with-the-wizard?hsLang=en), [Model a Dimensional Solution](https://knowledge.bigenius-x.com/model-a-dimensional-solution?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)

    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [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 Azuze DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azuze-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