Fact Load Strategy (Dataflow)
Applies to
Platform: Microsoft SQL Server · Snowflake · Databricks · Databricks dbt · Fabric Lakehouse · Fabric Warehouse · Oracle
Architecture: Dimensional · Data Mart
Fact Load Strategy (FactLoadStrategy) decides whether the loader of a Fact or Mart Fact empties the table before it inserts the source rows. It is the only load setting of these types: their Implementation Type is fixed to FactLoadStrategy.
Where to set it
Set the property when you edit a dataflow of a Fact or a Mart Fact.
Values and default
Truncate Insert(default): the TruncateInsertLoader empties the table and inserts all rows of the source view.Insert: the InsertLoader inserts rows into the table and keeps the existing rows.
Select one value per dataflow, or both values when the TruncateInsertLoader and the InsertLoader run in separate execution plans. The two loaders must not be in the same execution plan. With both values, the generator creates both loaders, and validation reports a warning (One Fact Load Strategy selected (Business Rule)). With no value, validation reports an error (Fact Load Strategy selected (Business Rule)).
Effect on generated output
A Mart Fact with Insert and a mapped BG_IncrementalFilter gets an increment table. Each load then reads only the source rows whose BG_IncrementalFilter is above the value stored by the previous load. When a Mart Fact with Insert has no incremental load, validation reports a warning (Fact Load Strategy Insert needs Incremental selected (Business Rule)). Configure an incremental load describes the increment.
Example
A Mart Fact on Microsoft SQL Server with Truncate Insert. Its loader contains, shortened:
TRUNCATE TABLE [<schema>].[DM_MF_load_truncate_insert_..._timestamp];
INSERT
INTO [<schema>].[DM_MF_load_truncate_insert_..._timestamp]
WITH(TABLOCK) (
...
FROM [<schema>].[DM_MF_load_truncate_insert_..._timestamp_Lkp]
AS [BG_Source]
With Insert, the loader is named DM_MF_<model object name>_InsertLoader and has no TRUNCATE TABLE.
Related articles
- Reference: Implementation Type (Model Object), BG_IncrementalFilter, One Fact Load Strategy selected (Business Rule), Fact Load Strategy selected (Business Rule)
- See also: Fact, Mart Fact, Configure an incremental load