---
title: Mart Fact
description: A Mart Fact loads measures into a table of the Mart layer and replaces the business key of each referenced Mart Dimension by its surrogate key.
---

[Skip to content](https://knowledge.bigenius-x.com/create-a-mart-fact#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)

# Mart Fact

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

A Mart Fact loads measures into a table of the Mart layer and replaces the business key of each referenced Mart Dimension by its surrogate key. Use it for transactions and events that you analyze along Mart Dimensions. After a load, each row holds the surrogate key of the dimension version that was valid at the row's `BG_EffectiveTimestamp`.

### Sources and relationships

A Mart Fact reads these sources, in one or more dataflows:

- Data Mart: Mart Composite and Mart Hierarchy Flatten of the project, and linked objects of a Data Vault, Dimensional (Entity, Fact) or Data Store project (Store Entity).
- Vault and Mart: the Raw Vault and Business Vault objects of the project except the composites, [Vault Out](https://knowledge.bigenius-x.com/create-a-vault-out?hsLang=en), Mart Composite and Mart Hierarchy Flatten.
- Dimensional and Mart (not on Databricks dbt and Oracle): Entity, Fact, Mart Composite, Mart Hierarchy Flatten and linked Store Entity.

A Mart Fact references at least one [Mart Dimension](https://knowledge.bigenius-x.com/create-a-mart-dimension?hsLang=en) through a relationship with a role. The relationship adds a foreign key term for each business key term of the Mart Dimension. You map them to the source columns that hold the business key. A [Mart Out](https://knowledge.bigenius-x.com/create-a-mart-out?hsLang=en) can read a Mart Fact.

### Create a Mart Fact

- With the wizard: open the menu of the source model object, choose **Automate** and then **Create Mart Fact**. The wizard creates the relationships with their roles and maps the foreign key terms and the selected terms. See [Create a Model Object with the wizard](https://knowledge.bigenius-x.com/create-a-model-object-with-the-wizard?hsLang=en). The wizard is not offered on a Mart Hierarchy Flatten or Hierarchy Flatten.  
  ![Menu of a Business Current View with Automate and its entries Create Mart Composite, Create Mart Dimension and Create Mart Fact](https://knowledge.bigenius-x.com/hs-fs/hubfs/knowledge_base_screenshots/create-a-mart-fact-automate-menu.png?width=400&height=190&name=create-a-mart-fact-automate-menu.png)
- Manually: [create a model object](https://knowledge.bigenius-x.com/create-a-model-object?hsLang=en) of type Mart Fact in the Datamart 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), [add a relationship](https://knowledge.bigenius-x.com/add-a-relationship?hsLang=en) to each Mart Dimension and [map the terms](https://knowledge.bigenius-x.com/map-a-source-term-with-a-target-term?hsLang=en), including the foreign key terms.

Business keys are optional on a Mart Fact, and the table has no primary key. Deduplication Method `Partition` uses the business keys to keep one row per key.

### Dimension lookup

The lookup view joins the result view of each referenced Mart Dimension on the foreign key terms:

- With `BG_EffectiveTimestamp` mapped, a row gets the version of a historized Mart Dimension whose `BG_ValidFromTimestamp` is at or before the effective timestamp and whose `BG_ValidToTimestamp` is after it. The lookup reads both from the result view, so it works with the project property [Persist Validity](https://knowledge.bigenius-x.com/persist-validity-project?hsLang=en) on or off.
- Without a mapping of `BG_EffectiveTimestamp`, the lookup uses the current time and assigns the current version of a historized Mart Dimension. Validation reports the warning `Relations will be resolved to the latest version in related model object.`
- A row without a matching dimension version gets the surrogate key -1, the unknown-member row of the Mart Dimension. This applies to an unknown business key, an empty foreign key and an effective timestamp before the first version. [Custom Singleton Values](https://knowledge.bigenius-x.com/custom-singleton-values-model-object?hsLang=en) sets the values of that row.

### Properties

- [Fact Load Strategy](https://knowledge.bigenius-x.com/fact-load-strategy-dataflow?hsLang=en), per dataflow: `Truncate Insert` (default) empties the table and inserts all source rows. `Insert` appends rows and keeps the existing ones. With `Insert` and no mapping of `BG_IncrementalFilter`, every load inserts all source rows again, and validation reports a warning. With a mapping, `Insert` appends only the increment; see [Configure an incremental load](https://knowledge.bigenius-x.com/configure-an-incremental-load?hsLang=en). With both values selected on one dataflow, the generator creates both loaders and validation reports a warning.

With Fact Load Strategy `Truncate Insert` on more than one dataflow, each dataflow's loader empties the table, so the table keeps only the rows of the dataflow loaded last. Use `Insert` when several dataflows load the same Mart Fact.

- Increment Management Type: `Auto` (default) or `User`, see [Configure an incremental load](https://knowledge.bigenius-x.com/configure-an-incremental-load?hsLang=en).
- [Implementation Type](https://knowledge.bigenius-x.com/implementation-type-model-object?hsLang=en): `FactLoadStrategy` only; the Fact Load Strategy decides the loader.
- [Foreign Key Mode](https://knowledge.bigenius-x.com/foreign-key-mode-model-object?hsLang=en): foreign key constraints from the surrogate key columns to the Mart Dimension tables; default `Create Disabled`.
- [Deduplication Method](https://knowledge.bigenius-x.com/deduplication-method-model-object?hsLang=en) (`None`, `Distinct`, `Partition`) and [Sort Order within Partition](https://knowledge.bigenius-x.com/deduplication-partition-model-object?hsLang=en), per dataflow.

### Default Terms

- `<Mart Dimension>_<role>_SK` ([`BG_MartFact_ForeignKey_Identity`](https://knowledge.bigenius-x.com/bg_martfact_foreignkey_identity?hsLang=en)): one per relationship, the surrogate key the lookup finds. The table stores it instead of the foreign key terms.
- [`BG_EffectiveTimestamp`](https://knowledge.bigenius-x.com/bg_effectivetimestamp?hsLang=en): the point in time that selects the dimension version; map it to the event time of the source. The table does not store it.
- [`BG_LoadTimestamp`](https://knowledge.bigenius-x.com/bg_loadtimestamp?hsLang=en): the load that inserted the row.
- [`BG_SourceSystem`](https://knowledge.bigenius-x.com/bg_sourcesystem?hsLang=en): empty unless you map it.
- [`BG_IncrementalFilter`](https://knowledge.bigenius-x.com/bg_incrementalfilter?hsLang=en), [`BG_ID`](https://knowledge.bigenius-x.com/bg_id?hsLang=en), [`BG_DataflowName`](https://knowledge.bigenius-x.com/bg_dataflowname?hsLang=en), [`BG_DataflowSetName`](https://knowledge.bigenius-x.com/bg_dataflowsetname?hsLang=en), `BG_LowerThreshold`, `BG_UpperThreshold` and `BG_IncrementLoadStatus`: terms of the increment table, used only for an incremental load.

### Generated objects

These are the names on Microsoft SQL Server for a Mart Fact `sales` with one dataflow. The notes below the table name the objects that exist only under a condition.

| Role | Generated name | Purpose |
| --- | --- | --- |
| Source | `DM_MF_sales_Source` | Joins and maps the sources |
| Deduplication | `DM_MF_sales_Deduplication` | Removes duplicate rows |
| IncrementSource | `DM_MF_sales_IncrementSource` | Finds the new increment |
| Increment | `DM_MF_sales_Increment` | Stores the increments |
| Lookup | `DM_MF_sales_Lkp` | Finds the surrogate keys |
| Loader | `DM_MF_sales_TruncateInsertLoader` | Loads the table |
| Storage | `DM_MF_sales` | Fact table |
| Result | `DM_MF_sales_Result` | Query view |

- The loaders are stored procedures, the fact table and the increment table are tables, and all other objects are views.
- Each selected Fact Load Strategy has its loader: `_TruncateInsertLoader` empties the table and then inserts, `_InsertLoader` only inserts.
- The increment table and the increment source view exist only with a mapped `BG_IncrementalFilter`.
- The deduplication view exists only with a Deduplication Method other than `None`.
- With more than one dataflow, the source, deduplication, increment source and lookup views and the loader exist once per dataflow, with the dataflow name after the model object name, for example `DM_MF_sales_Dataflow1_Source`.

With the default settings, the dependencies are:

```
sources -> DM_MF_sales_Source -> DM_MF_sales_Lkp
Mart Dimension result views -> DM_MF_sales_Lkp
DM_MF_sales_Lkp -> _TruncateInsertLoader -> DM_MF_sales -> _Result
```

### Example

The Mart Fact `sales` on Microsoft SQL Server reads the Business Current View `SALESTRANSACTION`. It references the Mart Dimension `employee` with the role `cashier`, so its surrogate key term is `employee_cashier_SK`. The foreign key term `FK_employee_cashier_EMPLOYEE_ID` is mapped to `CASHIER_ID`, and `BG_EffectiveTimestamp` to `TRANSACTION_TIME`. The Fact Load Strategy is `Truncate Insert`.

The Mart Dimension holds two versions of employee 1: surrogate key 1 from 2026-01-01 to 2026-03-01 and surrogate key 2 from 2026-03-01. The source delivers these transactions:

```
TRANSACTION_ID  CASHIER_ID  TRANSACTION_TIME  QUANTITY
101             1           2025-12-31 12:00  1.000
102             1           2026-01-01 00:00  2.000
103             1           2026-02-28 12:00  3.000
104             1           2026-03-01 00:00  4.000
105             99          2026-03-15 12:00  5.000
106             NULL        2026-03-16 12:00  6.000
```

### Check the result

After the load on 2026-10-28 at 10:00, query the result view, here in the schema `mart`:

```
SELECT TRANSACTION_ID, employee_cashier_SK, QUANTITY,
       BG_LoadTimestamp
FROM mart.DM_MF_sales_Result
ORDER BY TRANSACTION_ID;
```

This is the result, with a shortened column name and timestamp:

```
TRANSACTION_ID  SK  QUANTITY  LoadTs
101             -1  1.000     2026-10-28 10:00
102             1   2.000     2026-10-28 10:00
103             1   3.000     2026-10-28 10:00
104             2   4.000     2026-10-28 10:00
105             -1  5.000     2026-10-28 10:00
106             -1  6.000     2026-10-28 10:00
```

- Transaction 102 happened exactly at the start of version 1 and gets surrogate key 1. Transaction 104 happened exactly at the start of version 2 and gets surrogate key 2.
- Transaction 101 happened before the first version, so it references the unknown-member row -1.
- Cashier 99 does not exist and transaction 106 has no cashier, so both reference -1 as well.
- A repeated load empties the table and inserts the six rows again with the new load timestamp.

### Platform differences

- Foreign Key Mode: Microsoft SQL Server and Oracle offer `None`, `Create Disabled` and `Create Enforced`. Snowflake, Databricks, Databricks dbt and Fabric Warehouse offer `None` and `Create Disabled`. Fabric Lakehouse offers `None` only.
- Snowflake: names are in capitals. The load control task `LC_DM_MF_<MODEL OBJECT NAME>_TRUNCATEINSERTTASK` or `LC_DM_MF_<MODEL OBJECT NAME>_INSERTTASK` 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 `DM_MF_<model object name>_TruncateInsertLoader` or `DM_MF_<model object name>_InsertLoader`. 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.
- Databricks dbt: the generator creates `dm_mf_<model object name>_source` (view, including the deduplication), `dm_mf_<model object name>` (table with the lookup) and `dm_mf_<model object name>_result` (view). The table model uses the materialization `bg_overwrite` for `Truncate Insert` and `bg_append` for `Insert`. With more than one dataflow, each dataflow gets its own loader model. There is no increment table and no Increment Management Type. The properties File Format, Optimization Method and Optimization Method Columns apply.
- Oracle: the properties Create Table Statistics, Parallel Degree of Statistics Calculation, Table Compression, Tablespace Table, Tablespace Index and Partition Clause apply.

### Limitations

- A Mart Fact has at least one relationship to a Mart Dimension, and every foreign key term must be mapped.
- An aggregation must be defined in all dataflow sets or in none.
- Only `Truncate Insert` and `Insert` are supported as Fact Load Strategy.

### Release differences

- Generator 2.0: Foreign Key Mode is available.
- Generator 2.2: Increment Management Type and the terms `BG_LowerThreshold`, `BG_UpperThreshold` and `BG_IncrementLoadStatus` are available. Databricks dbt is available.
- Generator 2.4: Non-Historized Satellite and Non-Historized Business Satellite can be sources.

### Related articles

- Previous: [Mart Dimension](https://knowledge.bigenius-x.com/create-a-mart-dimension?hsLang=en)
- Next: [Configure an incremental load](https://knowledge.bigenius-x.com/configure-an-incremental-load?hsLang=en), [Generate artifacts](https://knowledge.bigenius-x.com/generate-artifacts?hsLang=en)
- Reference: [Fact Load Strategy (Dataflow)](https://knowledge.bigenius-x.com/fact-load-strategy-dataflow?hsLang=en), [Implementation Type (Model Object)](https://knowledge.bigenius-x.com/implementation-type-model-object?hsLang=en), [Foreign Key Mode (Model Object)](https://knowledge.bigenius-x.com/foreign-key-mode-model-object?hsLang=en), [Deduplication Method (Dataflow)](https://knowledge.bigenius-x.com/deduplication-method-model-object?hsLang=en), [Sort Order within Partition (Dataflow)](https://knowledge.bigenius-x.com/deduplication-partition-model-object?hsLang=en), [Custom Singleton Values (Model Object)](https://knowledge.bigenius-x.com/custom-singleton-values-model-object?hsLang=en), [BG\_MartFact\_ForeignKey\_Identity](https://knowledge.bigenius-x.com/bg_martfact_foreignkey_identity?hsLang=en), [BG\_EffectiveTimestamp](https://knowledge.bigenius-x.com/bg_effectivetimestamp?hsLang=en), [BG\_IncrementalFilter](https://knowledge.bigenius-x.com/bg_incrementalfilter?hsLang=en), [BG\_LoadTimestamp](https://knowledge.bigenius-x.com/bg_loadtimestamp?hsLang=en)
- See also: [Create a Model Object with the wizard](https://knowledge.bigenius-x.com/create-a-model-object-with-the-wizard?hsLang=en), [Mart Composite](https://knowledge.bigenius-x.com/create-a-mart-composite?hsLang=en), [Mart Out](https://knowledge.bigenius-x.com/create-a-mart-out?hsLang=en), [Model a Data Mart Solution](https://knowledge.bigenius-x.com/model-a-data-mart-solution?hsLang=en), [Effective Timestamp mapped (Business Rule)](https://knowledge.bigenius-x.com/effective-timestamp-mapped-business-rule?hsLang=en), [Fact Load Strategy Insert needs Incremental selected (Business Rule)](https://knowledge.bigenius-x.com/fact-load-strategy-insert-needs-incremental-selected-business-rule?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