Fabric Warehouse - Dimensional
Applies to
Platform: Fabric Warehouse
Architecture: Dimensional
Fabric Warehouse - Dimensional generates a Stage and a dimensional Core for Fabric Warehouse as T-SQL notebooks with a notebook load control. Select the Generator Configuration Fabric Warehouse Dimensional when you add a project whose Entities and Facts run in a Fabric Warehouse. This article lists what the configuration supports and where it differs from Microsoft SQL Server - Dimensional.
Scope and output
- Platform: Microsoft Fabric Warehouse. The configuration is available since Generator 2.2.
- Dataflow Modeling columns: Source; Stage in the Bronze column; Entity, Fact and Core Composite in the Silver column Dimensional. See Understand the Layering concept.
- Deployment layers: Stage, Cleanse and Core. Cleanse holds the source, deduplication and data quality objects; Core holds the tables, loaders and result views.
- Mart model objects: not available; use Fabric Warehouse - Dimensional and Mart.
- Output: T-SQL deployment notebooks, a deployment pipeline definition and Python load control notebooks, described in Fabric Warehouse - Artifacts.
Prerequisites
- A Fabric workspace with a warehouse for the target layers. The deployment scripts switch to the existing database with
USEand create missing schemas; they create no database. - A lakehouse for the load control execution log. The load control deployment notebook creates the log as a Delta table there.
- An Azure Key Vault with the tenant ID, client ID and client secret of a service principal. The load control notebook uses them to connect to the warehouse.
A setup example is in Fabric Warehouse - Target environment. Each layer has its own placeholders <project name>#<layer>#database_name and <project name>#<layer>#schema_name, where <layer> is stage, cleanse or core. The generated replacement_config.json presets the database names to warehouse. The load control placeholders are listed in Fabric Warehouse - Placeholder values.
Sources and linked projects
Stage source views read each source table by its three-part name [<database>].[<schema>].[<table>]. The source system has the type Microsoft Fabric Warehouse, and its database and schema names are placeholders. Discovery types are listed in Source Systems per Generator Configurations.
You can import a linked project as a source and export this project as a linked project. Entity, Fact and Core Composite read from a Stage, a Core Composite or a Store Entity of a linked Data Store project. Relationships of an Entity or a Fact point to an Entity.
Supported model objects
Implementation Type offers Permanent for Entity and FactLoadStrategy for Fact. Core Composite offers Virtual (default) and Cached, and Stage offers Cached (default) and Virtual.
Capabilities and limitations
- Keys: an Entity table has a primary key on its surrogate key and a unique constraint on its business key terms. A Fact table has no primary key. All constraints are created as
NONCLUSTEREDandNOT ENFORCED. - Foreign keys: Foreign Key Mode on Entity and Fact offers
NoneandCreate Disabled, and the default isCreate Disabled.Create Disabledcreates the foreign key asNOT ENFORCED;Nonecreates no constraint.Create Enforcedis not available. - Indexes: index management is not available, and the generated tables have no indexes.
- Identity values: the tables have no
IDENTITYcolumns. The Entity loader computes the surrogate key<model object name>_SK(BG_Entity_Identity) as the current maximum in the target plusROW_NUMBER(), inside its transaction.BG_IDandBG_DataQuality_IDget their values the same way. - Unknown member: the deployment adds a row with the surrogate key
-1to each Entity table when the row is missing. Custom Singleton Values sets its values. - Data quality: Entity and Fact support data quality rules.
- Deployment: a deployment notebook holds at most the number of objects set in Notebook Deployment Objects Limit; further objects go to the next notebook. The pipeline definition runs the load control deployment first, then the deployment notebooks in order. See Fabric Warehouse - Deployment.
- Loading: LoadControl Options offers only
Multi-Threading Notebook, a Python notebook that runs the loaders in dependency order. See Fabric Warehouse - Load data - Native Load Control. - Data types: validation reports warning
ID-35000when the length, precision or scale of a term does not fit its Fabric Warehouse data type. WarningID-35001flags a business key term of typevarchar(max)orvarbinary(max), because constraints on it could block the deployment.
Project properties
Project Settings shows these properties of the configuration, with their defaults:
- Hash Algorithm:
SHA1; alsoSHA2_256andMD5 - Hash Casing:
None; alsoUpperandLower - Hash Concatenation Separator:
_ - Hash Null Placeholder:
_NULL_ - Hash Trim: off
- Begin of Universe:
19000101 - End of Universe:
99991231 - Persist Validity: on
- Create Result Views: on
- Configure LoadControl: on
- Deploy LoadControl: on
- LoadControl Options:
Multi-Threading Notebook - Notebook Deployment Objects Limit:
100 - Deployment Options:
Generate Drop Table Statements
Platform differences
The table compares the configuration with Microsoft SQL Server - Dimensional of the same release:
| Item | Fabric Warehouse | Microsoft SQL Server |
|---|---|---|
| Timestamp Default Terms | datetime2(6) | datetimeoffset |
| Hash Default Terms | varbinary(20) | binary(20) |
| Text Default Terms | varchar | nvarchar |
| Surrogate key column | INT, set by the loader | INT IDENTITY |
| Primary key | nonclustered, not enforced | clustered, enforced |
| Persist Validity default | on | off |
| Enforced foreign keys | not available | available |
| Index management | not available | available |
| Artifact Output Mode | not available | available |
| Target Object Comment Type | not available | available |
LoadControl Options offers Multi-Threading Notebook on Fabric Warehouse and Native Load Control or Airflow on Microsoft SQL Server. Notebook Deployment Objects Limit exists only on Fabric Warehouse.
These Default Terms belong to each group:
- Timestamps:
BG_LoadTimestamp,BG_UpdateTimestamp,BG_ValidFromTimestamp,BG_ValidToTimestamp,BG_EffectiveTimestamp - Row hashes:
BG_RowHash,BG_RowHashScd1,BG_RowHashScd2 - Text, same lengths on both platforms:
BG_SourceSystem,BG_DataflowName,BG_DataflowSetName,BG_ErrorDescription,BG_IncrementLoadStatus
Example
An Entity common_customer_scd1 with the business key term CUSTOMER_ID generates this table in the Core layer. The excerpt shows the example schema core in place of the placeholder, leaves out six address columns and adds line breaks:
CREATE TABLE [core].[COR_EN_common_customer_scd1] (
[BG_SourceSystem] VARCHAR(255) NULL
,[BG_LoadTimestamp] DATETIME2(6) NOT NULL
,[BG_UpdateTimestamp] DATETIME2(6) NOT NULL
,[common_customer_scd1_SK] INT NOT NULL
,[CUSTOMER_ID] INT NOT NULL
,[CUSTOMER] VARCHAR(100) NOT NULL
,[CUSTOMER_TYPE] VARCHAR(100) NOT NULL
,[CUSTOMER_SINCE] DATE NULL
,[BG_RowHashScd1] VARBINARY(20) NOT NULL
)
;
ALTER TABLE [core].[COR_EN_common_customer_scd1]
ADD CONSTRAINT [PK_COR_EN_common_customer_scd1]
PRIMARY KEY NONCLUSTERED ([common_customer_scd1_SK]) NOT ENFORCED;
ALTER TABLE [core].[COR_EN_common_customer_scd1]
ADD CONSTRAINT [UC_COR_EN_common_customer_scd1]
UNIQUE NONCLUSTERED ([CUSTOMER_ID]) NOT ENFORCED;
The loader COR_EN_common_customer_scd1_Loader reads the current maximum, with the example database warehouse:
DECLARE @MaxIdentityValue INT = (
SELECT ISNULL(MAX([common_customer_scd1_SK]), 0)
FROM [warehouse].[core].[COR_EN_common_customer_scd1]);
Its insert statement then numbers the new rows from there:
@MaxIdentityValue + ROW_NUMBER() OVER (ORDER BY (SELECT NULL))
AS [common_customer_scd1_SK]
With Microsoft SQL Server - Dimensional, the key column is INT IDENTITY and the primary key is clustered.
Release differences
Project Settings shows the Generator Version of your project.
- Generator 2.2: first release of the configuration.
- Generator 2.3: the model object property Custom Singleton Values on Entity.
Related articles
- Previous:
- Fabric Warehouse: Target environment
- Next: Generate artifacts, Replace the placeholders in the artifacts
- Fabric Warehouse: Artifacts, Deployment, Load data - Native Load Control
- Reference: Foreign Key Mode (Model Object), Custom Singleton Values (Model Object), LoadControl Options (Project), Notebook Deployment Objects Limit (Project), BG_Entity_Identity, BG_Entity_ForeignKey_Identity, BG_Fact_ForeignKey_Identity
- Fabric Warehouse: Placeholder values
- See also: Available Generator Configurations, Understand the Generator Configuration, Microsoft SQL Server - Dimensional
- Fabric Warehouse: Dimensional and Mart, DataVault