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

Fabric Lakehouse - Data Store

Applies to
Platform: Fabric Lakehouse
Architecture: Data Store

Fabric Lakehouse - Data Store generates a Stage and a Store layer for Microsoft Fabric, as notebooks on Delta tables. Select the Generator Configuration Fabric Lakehouse DataStore when you add a project whose Data Store runs on Microsoft Fabric. With the project property Target Platform set to Azure Synapse, it generates for Azure Synapse Analytics instead.

Scope and output

  • Platform: with Target Platform Fabric, the default, each layer is a schema of a Microsoft Fabric lakehouse. With Azure Synapse, each layer is a database in Azure Synapse Analytics, which the deployment creates with CREATE DATABASE IF NOT EXISTS ... LOCATION.
  • Layers: Source, Stage and Store. Dataflow Modeling shows Stage and the Data Store in the Bronze column. See Understand the Layering concept.
  • Output: notebooks in the folders Jupyter, Helpers and LoadControl, the notebook <project>_deploy and, with Target Platform Fabric, deploy.ps1; described in Fabric Lakehouse - Artifacts.

Prerequisites

  • Target Platform Fabric: a Fabric workspace with a lakehouse with schemas. The deployment creates a schema per layer.
  • Target Platform Fabric: a service principal as Member of the workspace, and PowerShell 7 for deploy.ps1.
  • Target Platform Azure Synapse: an Azure Synapse workspace and a storage location per layer.

The setup is described in Fabric Lakehouse - Target environment and Azure Synapse - Target environment, the placeholders in Fabric Lakehouse - Placeholder values.

Sources and linked projects

The source system has the type Spark. Stage source views read each source table as <workspace>.<lakehouse>.<schema>.<table> with placeholders of the source system. Discover Parquet or Delta files on OneLake creates the source model objects; Source Systems per Generator Configurations lists the discovery types.

You can import a linked project, for example a Fabric Lakehouse - Stage Files or Fabric Lakehouse - Stage JDBC project, and export this project as a linked project.

Supported model objects

Capabilities and limitations

  • Loaders: one notebook per loader in the folder Jupyter, for example DS_SE_bk_multipart_not_nullable_Loader, with the load timestamp as the parameter bg_loadtimestamp.
  • Tables: Delta tables. File Format offers only delta, and Optimization Method offers Partitioned By and Cluster By.
  • Keys: the tables get no primary key, unique or foreign key constraints. Indexes: index management is not available.
  • Delete detection: Configure delete detection adds the column bg_isdeleted and a delete detection loader.
  • Data quality: Store Entity supports data quality rules.
  • Hashing: row hashes are UNHEX(SHA2(..., 256)) in Binary columns, see How biGENIUS-X builds hash values.
  • Validity: with Persist Validity on (default), historized tables store bg_validtotimestamp; off, the result view computes it.
  • Deployment: with the default Deployment Options, each deployment replaces the tables and the load control log tables with empty ones, see Redeploy and keep data. With Target Platform Fabric, it also creates a schema per layer.
  • Loading: LoadControl Options offers Multi-Threading Notebook and Airflow.

Project properties

The configuration offers these project properties, with their defaults:

Data types

The Default Terms get these data types:

  • Timestamps, Timestamp: BG_LoadTimestamp, BG_UpdateTimestamp, BG_ValidFromTimestamp, BG_ValidToTimestamp, BG_EffectiveTimestamp
  • Row hashes, Binary: BG_RowHash, BG_RowHashScd1, BG_RowHashScd2
  • Text, String: BG_SourceSystem, BG_DataflowName, BG_DataflowSetName, BG_ErrorDescription, BG_IncrementLoadStatus
  • Numbers, Long: BG_ID, BG_DataQuality_ID; Integer: BG_ErrorCount
  • Flags, Integer: BG_IsDeleted

Platform differences

The table compares the configuration with Microsoft SQL Server - Data Store of the same release:

ItemFabric LakehouseMicrosoft SQL Server
Timestamp Default TermsTimestampdatetimeoffset
Hash Default TermsBinarybinary(20)
Text Default TermsStringnvarchar
Hash Algorithm defaultSHA-256SHA1
Persist Validity defaultonoff
Deployment Options defaultdrop tables, create schemasdrop tables
Index managementnot availableavailable

Both platforms offer the LoadControl Option Airflow. The native load control is Multi-Threading Notebook on Fabric Lakehouse.

Example

A Store Entity bk_multipart_not_nullable with the business key terms bdc_shop_id and bdc_customer_id has four SCD1 terms. It generates this table. The excerpt shows the example lakehouse my_lakehouse with the schema store in place of the placeholders:

CREATE OR REPLACE TABLE `my_lakehouse`.`store`.
    `ds_se_bk_multipart_not_nullable` (
     `bg_loadtimestamp` Timestamp NOT NULL
    ,`bg_updatetimestamp` Timestamp NOT NULL
    ,`bg_sourcesystem` String
    ,`bg_rowhashscd1` Binary NOT NULL
    ,`bdc_shop_id` String NOT NULL
    ,`bdc_customer_id` String NOT NULL
    ,`first_name` String
    ,`last_name` String
    ,`date_of_birth` Date
    ,`location` String
)
USING delta

The hashing view builds the row hash of the SCD1 terms. It joins them with the separator _ and replaces NULL with _NULL_:

UNHEX(SHA2(COALESCE(`first_name`, '_NULL_')
    || '_' || COALESCE(`last_name`, '_NULL_')
    || '_' || COALESCE(CAST(`date_of_birth` AS String), '_NULL_')
    || '_' || COALESCE(`location`, '_NULL_'), 256)) AS `bg_rowhashscd1`

The loader merges the rows of the delta view into the table with MERGE on the business key.

Release differences

Project Settings shows the Generator Version of your project.

  • Generator 2.0: Target Object Comment Type replaced the value Target Platform with Tables and Tables and Views, default None.
  • Generator 2.2: added the project properties Persist Validity, Create Result Views and the four Hash properties, the model object property Increment Management Type on Stage, and Delete Detection Partial Terms and Delete Detection Partial Operator on Store Entity. Deployment Options added Generate Create Schema If Not Exists Statements, selected by default, and LoadControl Options added Airflow.
  • Generator 1.10: the project property Delta Detection. Since Generator 2.0, Delta Detection is a property of the Store Entity.

Related articles