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, 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 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 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. Its steps are Create Model Object, Create Dataflow, Create Relations, Define Roles, Map Foreign Key Terms, Map Selected Terms and Add to View. 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. The wizard is not offered on a Mart Hierarchy Flatten or Hierarchy Flatten.

- Manually: create a model object of type Mart Fact in the Data Mart column, create a dataflow set, add the source model objects, add a relationship to each Mart Dimension and map the terms, 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_EffectiveTimestampmapped, a row gets the version of a historized Mart Dimension whoseBG_ValidFromTimestampis at or before the effective timestamp and whoseBG_ValidToTimestampis after it. The lookup reads both from the result view, so it works with the project property Persist Validity 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 warningRelations 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 sets the values of that row.
Properties
- Fact Load Strategy, per dataflow:
Truncate Insert(default) orInsert. WithInsertand no mapping ofBG_IncrementalFilter, every load inserts all source rows again, and validation reports a warning. With a mapping,Insertappends only the increment, andTruncate Insertalso loads only the increment, except on Databricks dbt. Both values on one dataflow need the two loaders in separate execution plans. On Databricks dbt, select one value.
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) orUser, see Configure an incremental load. - Implementation Type:
FactLoadStrategyonly. - Foreign Key Mode: foreign key constraints from the surrogate key columns to the Mart Dimension tables; default
Create Disabled. - Deduplication Method and Sort Order within Partition, per dataflow.
Default Terms
<Mart Dimension>_<role>_SK(BG_MartFact_ForeignKey_Identity): one per relationship, the surrogate key the lookup finds. The table stores it instead of the foreign key terms.BG_EffectiveTimestamp: 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: the load that inserted the row.BG_SourceSystem: empty unless you map it.BG_IncrementalFilter,BG_ID,BG_DataflowName,BG_DataflowSetName,BG_LowerThreshold,BG_UpperThresholdandBG_IncrementLoadStatus: terms of the increment table, used only for an incremental load.
Generated objects
The part flow of Mart Fact shows which parts it can get and under which settings; the legend explains the symbols. Its lookup view is named _Lkp (_Lookup in the diagram).
These are the names on Microsoft SQL Server for a Mart Fact sales with one dataflow.
| Role | Generated name | Purpose | Generated when |
|---|---|---|---|
| Source | DM_MF_sales_Source | Joins and maps the sources | Always |
| Deduplication | DM_MF_sales_Deduplication | Removes duplicate rows | Deduplication Method Distinct or Partition |
| IncrementSource | DM_MF_sales_IncrementSource | Finds the new increment | BG_IncrementalFilter mapped, Increment Management Type Auto |
| Increment | DM_MF_sales_Increment | Stores the increments | BG_IncrementalFilter mapped |
| Lookup | DM_MF_sales_Lkp | Finds the surrogate keys | Always |
| Loader | DM_MF_sales_TruncateInsertLoader | Loads the table | Fact Load Strategy Truncate Insert |
| Loader | DM_MF_sales_InsertLoader | Inserts the new rows | Fact Load Strategy Insert |
| Storage | DM_MF_sales | Fact table | Always |
| Result | DM_MF_sales_Result | Query view | Create Result Views true |
Generated parts of model objects shows the order in which a load runs the parts and the settings that add or remove them.
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
The rules for names, loaders, deployment, platform properties and defaults are in Model object types on each platform. The Mart Fact differs from them in these points:
- Snowflake: the load control task
LC_DM_MF_<model object name>_TRUNCATEINSERTTASKorLC_DM_MF_<model object name>_INSERTTASKcalls the loader. - Databricks dbt: the table model does the lookup. The table model uses the materialization
bg_overwriteforTruncate Insertandbg_appendforInsert. With both values, it usesbg_overwrite, andInsertis ignored. With more than one dataflow, each dataflow gets its own loader model.
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.
Release differences
- Generator 2.0: Foreign Key Mode is available.
- Generator 2.2: Increment Management Type and the terms
BG_LowerThreshold,BG_UpperThresholdandBG_IncrementLoadStatusare available. Databricks dbt is available. - Generator 2.4: Non-Historized Satellite and Non-Historized Business Satellite can be sources.
Related articles
- Previous: Mart Dimension
- Next: Configure an incremental load, Generate artifacts
- Reference: Fact Load Strategy (Dataflow), Implementation Type (Model Object), Foreign Key Mode (Model Object), Deduplication Method (Dataflow), Sort Order within Partition (Dataflow), Custom Singleton Values (Model Object), BG_MartFact_ForeignKey_Identity, BG_EffectiveTimestamp, BG_IncrementalFilter, BG_LoadTimestamp, Model object types on each platform, Generated parts of model objects
- See also: Create a Model Object with the wizard, Mart Composite, Mart Out, Model a Data Mart Solution, Effective Timestamp mapped (Business Rule), Fact Load Strategy Insert needs Incremental selected (Business Rule)
