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

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

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 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 sets the values of that row.

Properties

  • Fact Load Strategy, 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. 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.

Default Terms

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.

RoleGenerated namePurpose
SourceDM_MF_sales_SourceJoins and maps the sources
DeduplicationDM_MF_sales_DeduplicationRemoves duplicate rows
IncrementSourceDM_MF_sales_IncrementSourceFinds the new increment
IncrementDM_MF_sales_IncrementStores the increments
LookupDM_MF_sales_LkpFinds the surrogate keys
LoaderDM_MF_sales_TruncateInsertLoaderLoads the table
StorageDM_MF_salesFact table
ResultDM_MF_sales_ResultQuery 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 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, Optimization Method, Optimization Method Columns and Use Sequential Dataflow Execution 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, only with Create Result Views on). 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