Data Vault Extension Points
The Data Vault category has the following available Extension Points defined.
Data Vault Bridge Custom SQL
Configure custom SQL for the Data Vault Bridge
Parameters
Name | Type | Description |
|---|---|---|
| table | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the SQL will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
| DvBridgeLagSql | String | Text placed after the lag declaration of the bridge load procedure, so it can change how many days the procedure looks back. On Snowflake the text stands as written after the lag_days line and is JavaScript, for example lag_days = -7, and a text that starts with SET, DECLARE, SELECT, ALTER, CALL, EXECUTE or USE as a SQL statement stops the build unless the file also sets DvBridgeOverrideSql. In the Databricks and Fabric lakehouse control notebooks the text stands as written after the lag_days line and is Python. |
| DvBridgeAddParameter | String | Parameter declarations added to the bridge load procedure, which declares no parameters of its own. |
| DvBridgeDateWhereSql | String | A condition appended to the WHERE of the date statement of the bridge load, which finds the latest loaded bridge date. Start with AND. |
| DvBridgeDateOverrideWhereSql | String | Replaces the WHERE of the date statement of the bridge load. Write the whole clause, starting with WHERE. |
| DvBridgeWhereSql | String | A condition appended to the WHERE of the bridge merge source after the generated effective date condition. Start with AND. The hub alias is hub. |
| DvBridgeOverrideWhereSql | String | Replaces the WHERE of the bridge merge source. Write the whole clause, starting with WHERE. When both override outputs are set, this one is used. |
| DvBridgeHubWhereSql | String | A condition on the hub appended to the WHERE of the bridge merge source after the generated effective date condition. Start with AND. The hub alias is hub. |
| DvBridgeHubOverrideWhereSql | String | Replaces the WHERE of the bridge merge source with a clause on the hub. Write the whole clause, starting with WHERE. |
| DvBridgeColumnSelect | String | Columns appended to the select list of the bridge merge source after the effective date column. Start with a comma. |
| DvBridgeColumnInsert | String | Columns appended to the INSERT column list of the bridge merge. Start each column on its own line with a comma. The same names are added to the VALUES list with the INS alias. |
| DvBridgeColumnElements | String | Column definitions added to the Biml definition of the bridge table after the generated columns, written as Biml Column elements. |
| DvBridgeOverrideSql | String | Replaces the whole bridge load procedure. In the Databricks and Fabric lakehouse notebooks it replaces the merge statement alone. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvBridgeSql" #>
<#@ property name="table" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<!-- Use DvBridgeSql combined the below samples to add additional logic to the Bridge load procedure. -->
<#*
<# CustomOutput.ObjectInherit = false; #>
<# CustomOutput.DvBridgeColumnSelect = @"";#>
<# CustomOutput.DvBridgeColumnInsert = @""; #>
<# CustomOutput.DvBridgeDateWhereSql = @""; #>
<# CustomOutput.DvBridgeDateOverrideWhereSql = @""; #>
<# CustomOutput.DvBridgeWhereSql = @""; #>
<# CustomOutput.DvBridgeOverrideWhereSql = @""; #>
<# CustomOutput.DvBridgeHubWhereSql = @""; #>
<# CustomOutput.DvBridgeHubOverrideWhereSql = @""; #>
<# CustomOutput.DvBridgeOverrideWhereSql = @""; #>
<# CustomOutput.DvBridgeColumnElements = @""; #>
<# CustomOutput.DvBridgeOverrideSql = @"Add SQL here to completely override the BRIDGE Code."; #>
*#>
What It Does
Injects custom SQL fragments into the generated Bridge (BRG) table load, which is a stored procedure, or a notebook on Databricks and a Fabric lakehouse. Bridge tables pre-join Hub and Link structures to flatten the Data Vault model for downstream query performance. This extension point lets you control column selection, WHERE conditions, hub filters, and date filtering -- or replace the whole generated Bridge procedure with your own SQL, which on Databricks and a Fabric lakehouse takes the place of the merge statement alone.
Where It Fires
Registered in the BimlFlex extension point manifest for Bridge table (BRG) SQL customization. The extension point is consumed when BimlFlex generates the load of any object with a Bridge table type. Multiple custom outputs are available: DvBridgeColumnSelect, DvBridgeColumnInsert, DvBridgeWhereSql, DvBridgeHubWhereSql, DvBridgeOverrideSql, and others. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics, Fabric Data Warehouse, Fabric SQL database and Snowflake the Bridge load is a stored procedure. On Databricks and a Fabric lakehouse it is a notebook: DvBridgeWhereSql, DvBridgeOverrideWhereSql, DvBridgeHubWhereSql, DvBridgeHubOverrideWhereSql, DvBridgeColumnSelect and DvBridgeColumnInsert shape its merge statement, DvBridgeOverrideSql replaces that merge statement alone, DvBridgeDateWhereSql and DvBridgeDateOverrideWhereSql apply as Spark SQL in the lookup that sets cur_from_date in its control notebook, and DvBridgeLagSql is written into the Python code of that control notebook.
When to Use It
- Add a tenant or security filter to Bridge queries by setting
DvBridgeWhereSqlto append aWHEREclause condition -- for example, filteringdv.BRG_SalesOrderto only include active orders from theAWLT_SRCsource system. - Include additional columns from Satellites in the Bridge output by setting
DvBridgeColumnSelectandDvBridgeColumnInsert-- use this instead of manually creating a view on top of the Bridge table. - Override the date-range filtering logic with
DvBridgeDateWhereSqlwhen the default temporal join behavior does not match your business rules. - Completely replace the generated Bridge procedure with
DvBridgeOverrideSql, or on Databricks and a Fabric lakehouse its merge statement alone, when the standard template cannot express your join pattern -- use this instead of creating a post-deploy script, so the logic stays inside the BimlFlex lifecycle. - Customize Hub join conditions with
DvBridgeHubWhereSqlwhen you need to exclude ghost records or filter by record source during the Bridge build forLOAD_BFX_DVbatch processing.
Prerequisites
- Target object must be configured as a Bridge (BRG) type in the BimlFlex metadata.
- The Bridge object must reference at least one Hub and one or more Links or Satellites.
- The
BFX_DVconnection (or equivalent Data Vault target connection) must be configured. - Familiarity with the generated Bridge stored procedure or notebook structure is recommended -- build once without extension points and review the output.
Implementation Steps
- In BimlFlex, open the Extension Points editor and create a new extension point file.
- Set the
extensionpointdirective toDvBridgeSqland thetargetattribute to your Bridge object. - Uncomment and populate only the
CustomOutputproperties you need. - Build the project and review the generated stored procedure, or the generated notebook on Databricks and a Fabric lakehouse, to confirm your SQL fragments appear in the correct locations.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvBridgeSql" target="BRG_SalesOrder" #>
<#@ property name="table" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
<# CustomOutput.DvBridgeWhereSql = @"AND hub.[FlexRowRecordSource] = 'AWLT'"; #>
<# CustomOutput.DvBridgeColumnSelect = @",hub.[FlexRowRecordSource] AS [RecordSource]"; #>
<# CustomOutput.DvBridgeColumnInsert = @",[RecordSource]"; #>
<# CustomOutput.DvBridgeColumnElements = @"<Column Name=""RecordSource"" DataType=""AnsiString"" Length=""10"" IsNullable=""true"" />"; #>
Example
Before (the select that feeds the merge in the generated Bridge procedure on SQL Server, for a Bridge on HUB_Customer whose Join Sql is INNER JOIN {{dv.LNK_SalesOrder}} l1 ON hub.{{Customer_SK}} = l1.{{Customer_SK}}):
SELECT -- ... the generated columns of the Bridge ...
,COALESCE(l1.[FlexRowEffectiveFromDate], hub.[FlexRowEffectiveFromDate]) AS [FlexRowEffectiveFromDate]
FROM [dv].[HUB_Customer] hub
-- ... the join lines of the Bridge Join Sql ...
WHERE COALESCE(l1.[FlexRowEffectiveFromDate], hub.[FlexRowEffectiveFromDate]) > @cur_from_date
After (with DvBridgeWhereSql and DvBridgeColumnSelect applied):
SELECT -- ... the generated columns of the Bridge ...
,COALESCE(l1.[FlexRowEffectiveFromDate], hub.[FlexRowEffectiveFromDate]) AS [FlexRowEffectiveFromDate]
,hub.[FlexRowRecordSource] AS [RecordSource]
FROM [dv].[HUB_Customer] hub
-- ... the join lines of the Bridge Join Sql ...
WHERE COALESCE(l1.[FlexRowEffectiveFromDate], hub.[FlexRowEffectiveFromDate]) > @cur_from_date
AND hub.[FlexRowRecordSource] = 'AWLT'
Common Mistakes
- Setting
DvBridgeOverrideSqlwhile also setting individual fragment outputs -- Symptom: some of the individual fragments are silently ignored. Where the Bridge load is a stored procedure, the override replaces the whole procedure, so the lag, date, where,DvBridgeColumnSelect,DvBridgeColumnInsertandDvBridgeAddParameteroutputs of the file do not apply, and neither does aDvBridgePreProcessSqlorDvBridgePostProcessSqlextension point. In the Databricks and Fabric lakehouse notebooks the override replaces the merge statement alone, soDvBridgeWhereSql,DvBridgeOverrideWhereSql,DvBridgeHubWhereSql,DvBridgeHubOverrideWhereSql,DvBridgeColumnSelectandDvBridgeColumnInsertdo not apply, while the lag and date outputs still do.DvBridgeColumnElementsstill adds its columns to the Biml definition of the Bridge table. Fix: use eitherDvBridgeOverrideSqlor the granular outputs, not both. - Forgetting to include
ANDat the start ofDvBridgeWhereSql-- Symptom: a SQL syntax error. Fix: startDvBridgeWhereSql,DvBridgeHubWhereSqlandDvBridgeDateWhereSqlwithAND, since BimlFlex appends each after the generated conditions of theWHEREit extends. StartDvBridgeOverrideWhereSql,DvBridgeHubOverrideWhereSqlandDvBridgeDateOverrideWhereSqlwithWHERE, since each replaces a wholeWHERE. - Adding columns in
DvBridgeColumnSelectwithout matchingDvBridgeColumnInsert-- Symptom: the merge does not write the columns thatDvBridgeColumnSelectadds, and a column thatDvBridgeColumnInsertnames without a matching column inDvBridgeColumnSelectcauses an error, because theVALUESlist of the merge reads that name from the merge source with theINSalias. Fix: always set both properties together with matching column lists. - Setting
ObjectInherit = truewithout realizing it applies to all Bridge objects in the batch -- Symptom: unintended filters applied to every Bridge in theLOAD_BFX_DVbatch. Fix: useObjectInherit = falseand target individual Bridge objects with thetargetattribute.
Related Extension Points
- DvBridgePreProcessSql / DvBridgePostProcessSql -- use these to add setup or cleanup steps around the Bridge load rather than modifying the core query logic.
- DvPitSql -- the PIT equivalent of this extension point; use when building Point-in-Time tables instead of Bridge tables.
- DvPreProcessSql / DvPostProcessSql -- for wrapping the main Data Vault load (Hub, Link, Satellite) procedures; these do not affect Bridge objects.
Data Vault Bridge Post Process SQL
Configure SQL to be injected after the Bridge Query
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvBridgePostProcessSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment that executes immediately after the Bridge table load query completes, within the generated stored procedure, or the generated notebook on Databricks. On a Fabric lakehouse it is placed as a Python cell of the control notebook, as Where It Fires describes. This is useful for post-load validation, logging, index maintenance, or cleanup operations that should run every time the Bridge table is refreshed.
Where It Fires
Consumed as a pre/post process SQL wrapper for Bridge table generation. The SQL fragment is appended after the main Bridge MERGE statement in the generated stored procedure, and after the merge statement in the Databricks notebook that holds it. On a Fabric lakehouse the text is placed as its own Python cell of the control notebook, after the cell that runs the merge, so write it as Python there. Applied only to objects with a Bridge (BRG) type. Supports SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics, Fabric Data Warehouse, Fabric SQL database and Snowflake, where the Bridge load is a stored procedure, and Databricks and a Fabric lakehouse, where it is a notebook.
When to Use It
- Log the row count loaded into
dv.BRG_SalesOrderto an audit table after each Bridge refresh -- use this instead of adding a separate post-deploy script that runs outside the Bridge load. - Rebuild or update statistics on the Bridge table after the load completes to ensure downstream queries have optimal execution plans.
- Execute a data quality check after the Bridge load and raise an error if integrity constraints are violated -- for example, verifying no orphaned Link keys exist in
dv.BRG_SalesOrder. - Send a notification or update a control table to signal that the Bridge refresh for the
LOAD_BFX_DVbatch is complete.
Prerequisites
- Target object must be a Bridge (BRG) type in BimlFlex metadata.
- The
BFX_DVconnection must be configured. - The SQL fragment must be valid for the target platform (e.g., T-SQL for MSSQL, Snowflake SQL for SFLDW).
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvBridgePostProcessSqland thetargetattribute to your Bridge object. - Write the SQL fragment that should execute after the Bridge load.
- Build and review the generated stored procedure, or the generated notebook on Databricks and a Fabric lakehouse, to confirm placement.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvBridgePostProcessSql" target="BRG_SalesOrder" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
INSERT INTO dv.AuditLog (ObjectName, RowsAffected, LoadDate)
SELECT 'BRG_SalesOrder', @@ROWCOUNT, GETDATE();
Example
Before (end of generated Bridge procedure on SQL Server):
-- ... Bridge MERGE completes ...
GO
After (with DvBridgePostProcessSql applied):
-- ... Bridge MERGE completes ...
INSERT INTO dv.AuditLog (ObjectName, RowsAffected, LoadDate)
SELECT 'BRG_SalesOrder', @@ROWCOUNT, GETDATE();
GO
Common Mistakes
- Referencing
@@ROWCOUNTafter additional statements -- Symptom: audit log always shows 0 or incorrect counts. Fix: capture@@ROWCOUNTin the very first statement of your post-process SQL since any intervening statement resets it. - Using platform-specific SQL without checking the target connection type -- Symptom: build errors when deploying to Snowflake with T-SQL syntax. Fix: use BimlScript conditionals to emit platform-appropriate SQL, or create separate extension points per target platform.
- Expecting an error raised in the post process SQL to undo the Bridge load -- Symptom: the rows that the merge already wrote stay in the Bridge table, because the generated load opens no transaction around the merge and this SQL. Fix: catch the error in your own SQL, for example with a TRY/CATCH block on SQL Server, if you want to log it without failing the load, and do not rely on an error to remove rows that the merge has written.
Related Extension Points
- DvBridgePreProcessSql -- the counterpart that runs before the Bridge query; use together for setup/teardown patterns.
- DvBridgeSql -- for modifying the Bridge query logic itself rather than adding steps before or after it.
- DvPostProcessSql -- similar post-process hook but for Hub, Link, and Satellite loads rather than Bridge objects.
Data Vault Bridge Pre Process SQL
Configure SQL to be injected before the Bridge Query
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvBridgePreProcessSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment that executes before the Bridge table load query, at the start of the generated stored procedure, or just before the merge in the generated notebook on Databricks. On a Fabric lakehouse it is placed as a Python cell of the control notebook, as Where It Fires describes. This is commonly used for creating temporary tables, setting session variables, truncating the target Bridge table for a full reload, or performing pre-load validation checks. The generated load opens no transaction around this SQL and the Bridge load.
Where It Fires
Consumed as a pre/post process SQL wrapper for Bridge table generation. The SQL fragment is inserted at the start of the generated stored procedure, before the lag and date statements and the main Bridge MERGE statement, and before the merge statement in the Databricks notebook that holds it. On a Fabric lakehouse the text is placed as its own Python cell of the control notebook, before the cell that sets the lag and dates and runs the merge, so write it as Python there. Applied only to objects with a Bridge (BRG) type. Supports SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics, Fabric Data Warehouse, Fabric SQL database and Snowflake, where the Bridge load is a stored procedure, and Databricks and a Fabric lakehouse, where it is a notebook.
When to Use It
- Truncate the Bridge table before a full reload -- use this instead of configuring a separate TRUNCATE step in your orchestration when you always want
dv.BRG_SalesOrderfully refreshed. - Create a temporary table or table variable to stage intermediate results that the Bridge query will reference.
- Set session-level options such as
SET NOCOUNT ONorSET ANSI_WARNINGS OFFthat affect the Bridge query behavior. - Log the start time of the Bridge load to an audit table for the
LOAD_BFX_DVbatch monitoring.
Prerequisites
- Target object must be a Bridge (BRG) type in BimlFlex metadata.
- The
BFX_DVconnection must be configured. - The SQL fragment must be valid for the target platform.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvBridgePreProcessSqland thetargetattribute to your Bridge object. - Write the SQL fragment that should execute before the Bridge load.
- Build and review the generated stored procedure, or the generated notebook on Databricks and a Fabric lakehouse, to confirm placement.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvBridgePreProcessSql" target="BRG_SalesOrder" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
TRUNCATE TABLE dv.BRG_SalesOrder;
INSERT INTO dv.AuditLog (ObjectName, EventType, EventDate)
SELECT 'BRG_SalesOrder', 'BridgeLoadStart', GETDATE();
Example
Before (start of generated Bridge procedure on SQL Server):
CREATE PROC [dv].[flex_BRG_SalesOrder]
AS
SET NOCOUNT ON
-- ... Bridge MERGE begins ...
After (with DvBridgePreProcessSql applied):
CREATE PROC [dv].[flex_BRG_SalesOrder]
AS
SET NOCOUNT ON
TRUNCATE TABLE dv.BRG_SalesOrder;
INSERT INTO dv.AuditLog (ObjectName, EventType, EventDate)
SELECT 'BRG_SalesOrder', 'BridgeLoadStart', GETDATE();
-- ... Bridge MERGE begins ...
Common Mistakes
- Truncating a Bridge table that is referenced by active queries -- Symptom: blocking or deadlocks during concurrent reads. Fix: use a staging pattern with a swap (rename) strategy, or schedule Bridge refreshes during low-usage windows.
- Creating a temp table with
#prefix in Snowflake -- Symptom: syntax error. Fix: use Snowflake temporary table syntax (CREATE TEMPORARY TABLE) or use BimlScript conditionals to handle platform differences. - Placing DML that depends on the Bridge load results in PreProcess instead of PostProcess -- Symptom: the DML runs on stale data. Fix: move result-dependent logic to
DvBridgePostProcessSql.
Related Extension Points
- DvBridgePostProcessSql -- the counterpart that runs after the Bridge query; use together for setup/teardown patterns.
- DvBridgeSql -- for modifying the Bridge query logic itself rather than adding steps before or after it.
- DvPreProcessSql -- similar pre-process hook but for Hub, Link, and Satellite loads rather than Bridge objects.
Data Vault Pit Custom SQL
Configure custom SQL for the Data Vault PIT
Parameters
Name | Type | Description |
|---|---|---|
| table | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the SQL will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
| DvPitAddParameter | String | The parameter declarations of the point in time procedure. The generated procedure declares no parameters, so this text is its whole parameter list. |
| DvPitLagSql | String | Text placed after the lag declaration of the point in time procedure, so it can change how many days the procedure looks back from the latest loaded point in time date. On Snowflake the text stands as written after the lag_days line and is JavaScript, for example lag_days = -7. In the Databricks and Fabric lakehouse control notebooks the text stands as written after the lag_days line and is Python. |
| DvPitDateWhereSql | String | Text appended after the generated WHERE of the lookup that finds the latest loaded point in time date, written to start with AND. |
| DvPitDateOverrideWhereSql | String | The whole WHERE of the lookup that finds the latest loaded point in time date, written with WHERE, in place of the generated key and minimum date conditions. When it is set, DvPitDateWhereSql is not used. |
| DvPitHubWhereSql | String | The WHERE text of the hub key lookup of the point in time statement, written with WHERE. The generated default key and load date conditions follow it with AND. |
| DvPitHubOverrideWhereSql | String | The whole WHERE of the hub key lookup of the point in time statement, in place of the generated default key and load date conditions. When it is set, DvPitHubWhereSql is not used. |
| DvPitSatWhereSql | String | The WHERE text of each satellite key lookup of the point in time statement, written with WHERE. The generated default key and load date conditions follow it with AND. |
| DvPitSatOverrideWhereSql | String | The whole WHERE of each satellite key lookup of the point in time statement, in place of the generated default key and load date conditions. When it is set, DvPitSatWhereSql is not used. |
| DvPitDeleteWhereSql | String | Not used. BimlFlex does not read this output, so setting it changes nothing in the generated code. |
| DvPitDeleteOverrideWhereSql | String | Not used. BimlFlex does not read this output, so setting it changes nothing in the generated code. |
| DvPitSourceAddSelect | String | Columns appended to the select list of the point in time delta statement after the generated columns, each written with a leading comma. |
| DvPitTargetAddInsert | String | Not used. BimlFlex does not read this output, so setting it changes nothing in the generated code. |
| DvPitTargetAddSelect | String | Not used. BimlFlex does not read this output, so setting it changes nothing in the generated code. |
| DvPitColumnElements | String | Biml Column elements added to the Biml definition of the point in time table after the generated columns. |
| DvPitOverrideSql | String | The whole point in time procedure, in place of the generated one. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPitSql" #>
<#@ property name="table" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<!-- Use DvPitSql combined the below samples to add additional logic to the PIT load procedure. -->
<#*
<# CustomOutput.ObjectInherit = false; #>
<# CustomOutput.DvPitAddParameter = @" ,@TenantCode VARCHAR(10) = NULL"; #>
<# CustomOutput.DvPitLagSql = @"SET @Lag = -7"; #>
<# CustomOutput.DvPitDateWhereSql = @"AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitDateOverrideWhereSql = @"WHERE [FlexRowEffectiveFromDate] > '1900-01-01'AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitDeleteWhereSql = @"AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitDeleteOverrideWhereSql = @"WHERE [FlexRowEffectiveFromDate] > '1900-01-01'AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitHubWhereSql = @"AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitHubOverrideWhereSql = @"WHERE [FlexRowEffectiveFromDate] > '1900-01-01'AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitSatWhereSql = @"AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitSatOverrideWhereSql = @"WHERE [FlexRowEffectiveFromDate] > '1900-01-01'AND [FlexRowRecordSource] = 'AW'"; #>
<# CustomOutput.DvPitSourceAddSelect = @",l1.[TenantCode] "; #>
<# CustomOutput.DvPitTargetAddInsert = @",[TenantCode] "; #>
<# CustomOutput.DvPitTargetAddSelect = @",[TenantCode] "; #>
<# CustomOutput.DvPitColumnElements = @"<Column Name=""TenantCode"" DataType=""AnsiString"" Length=""3"" IsNullable=""true"" />"; #>
<# CustomOutput.DvPitOverrideSql = @"Add SQL here to completely override the PIT Code."; #>
*#>
This is the template BimlFlex writes for a new extension point file. BimlFlex does not read four of the outputs it lists: DvPitDeleteWhereSql, DvPitDeleteOverrideWhereSql, DvPitTargetAddInsert and DvPitTargetAddSelect. The template's samples for DvPitHubWhereSql and DvPitSatWhereSql begin with AND, but each of these two outputs must begin with WHERE, as the Implementation Steps below show. The template's DvPitSourceAddSelect sample uses the alias l1, which the load's select does not have. The aliases there are DATES, hub (or link), pit, and sat1, sat2 and so on for the Satellites. Its DvPitLagSql sample, SET @Lag = -7, is SQL Server code. On Snowflake the PIT procedure is JavaScript, so write JavaScript that sets lag_days instead, for example lag_days = -7: there SET @Lag = -7 stops the build unless the file also sets DvPitOverrideSql.
What It Does
Injects custom SQL fragments into the generated Point-in-Time (PIT) table load, which is a stored procedure, or a notebook on Databricks and a Fabric lakehouse. PIT tables create snapshot records that join a Hub, or a Link, with the Satellites chosen for the PIT at specific points in time, enabling efficient temporal queries without complex multi-way outer joins. This extension point lets you add parameters to the PIT procedure, modify lag calculations, customize the WHERE conditions of the Hub and Satellite selects, add column definitions to the PIT table where its load is a stored procedure -- or replace the whole generated PIT procedure with DvPitOverrideSql, which has no effect on Databricks and a Fabric lakehouse.
Where It Fires
Consumed during PIT table SQL generation. BimlFlex reads these custom outputs: DvPitAddParameter, DvPitLagSql, DvPitDateWhereSql, DvPitDateOverrideWhereSql, DvPitHubWhereSql, DvPitHubOverrideWhereSql, DvPitSatWhereSql, DvPitSatOverrideWhereSql, DvPitSourceAddSelect, DvPitColumnElements, and DvPitOverrideSql. It does not read DvPitDeleteWhereSql, DvPitDeleteOverrideWhereSql, DvPitTargetAddInsert or DvPitTargetAddSelect, so these four have no effect. Applied only to objects with a PIT table type. Supports SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics, Fabric Data Warehouse, Fabric SQL database and Snowflake targets. On Snowflake the PIT procedure is JavaScript: BimlFlex writes DvPitAddParameter into its parameter list with the leading comma dropped and the lines joined by one space, and writes DvPitLagSql as written on the line after the lag_days declaration, so write it as JavaScript that sets lag_days, for example lag_days = -7. If DvPitLagSql starts with SET, DECLARE, SELECT, ALTER, CALL, EXECUTE or USE as a SQL statement, such as SET @Lag = -7, and the file does not set DvPitOverrideSql, the build stops with an error that names the object and the extension point file. On a Fabric lakehouse or Databricks target the PIT load is a notebook: it takes DvPitHubWhereSql, DvPitHubOverrideWhereSql, DvPitSatWhereSql, DvPitSatOverrideWhereSql and DvPitSourceAddSelect, takes DvPitDateWhereSql and DvPitDateOverrideWhereSql as Spark SQL in the lookup that sets cur_from_date in its control notebook, writes DvPitLagSql into its Python code, and does not use DvPitAddParameter, DvPitColumnElements or DvPitOverrideSql.
When to Use It
- Add a parameter to the PIT procedure with
DvPitAddParameterand use it inDvPitHubWhereSqlandDvPitSatWhereSql-- for example, a@TenantCodeparameter that limitsdv.PIT_Customerto one tenant's rows. This example is written for SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics, Fabric Data Warehouse and Fabric SQL database. The call BimlFlex generates runs the procedure without arguments, so the parameter takes its default: write the filter so the default does what you want, for exampleWHERE (@TenantCode IS NULL OR hub.[TenantCode] = @TenantCode), or call the procedure yourself with a value. On Snowflake BimlFlex writesDvPitAddParameterinto the parameter list of the procedure as well, and the call it generates there also passes no arguments. - Change the default lag period with
DvPitLagSqlto control how far back the PIT table looks for satellite changes -- use this instead of modifying the BimlFlex setting when different PIT tables need different lag windows. - Filter the Satellite rows with
DvPitSatWhereSql-- for example, only rows whoseFlexRowRecordSourceisAWLT. The filter applies to every Satellite of the PIT. - Add a column definition to the PIT table with
DvPitColumnElementswhere the PIT load is a stored procedure. On Databricks and a Fabric lakehouse it adds no column to the table.DvPitSourceAddSelectadds an expression to the source select of the load, but the generated load does not write it to the added column, because BimlFlex does not readDvPitTargetAddInsertandDvPitTargetAddSelect. To load an added column, replace the load withDvPitOverrideSql. - Completely replace the generated PIT procedure with
DvPitOverrideSqlwhen the standard PIT pattern does not match your requirements -- use this instead of creating a separate post-deploy stored procedure. On Databricks and a Fabric lakehouseDvPitOverrideSqlhas no effect.
Prerequisites
- Target object must be configured as a PIT type in the BimlFlex metadata.
- The PIT object must reference a Hub or a Link, and one or more of its Satellites.
- The
BFX_DVconnection (or equivalent Data Vault target connection) must be configured. - When adding columns via
DvPitColumnElements, the Biml XML element must conform to the<Column>schema with validDataType,Length, andIsNullableattributes. - Familiarity with the generated PIT stored procedure or notebook structure is recommended -- build once without extension points and review the output.
Implementation Steps
- In BimlFlex, open the Extension Points editor and create a new extension point file.
- Set the
extensionpointdirective toDvPitSqland thetargetattribute to your PIT object. - Uncomment and populate only the
CustomOutputproperties you need. - If adding a column, define it with
DvPitColumnElements. Leave outDvPitTargetAddInsertandDvPitTargetAddSelect, which have no effect. - Build the project and review the generated stored procedure, or the generated notebook on Databricks and a Fabric lakehouse, to confirm your SQL fragments appear correctly.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPitSql" target="PIT_Customer" #>
<#@ property name="table" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
<# CustomOutput.DvPitAddParameter = @" ,@TenantCode VARCHAR(10) = NULL"; #>
<# CustomOutput.DvPitLagSql = @"SET @Lag = -7"; #>
<# CustomOutput.DvPitHubWhereSql = @"WHERE hub.[FlexRowRecordSource] = 'AWLT'"; #>
<# CustomOutput.DvPitSatWhereSql = @"WHERE [FlexRowRecordSource] = 'AWLT'"; #>
DvPitHubWhereSql and DvPitSatWhereSql take the place of the WHERE keyword in the select they filter, and BimlFlex adds its own conditions after them with AND, so each must begin with WHERE. The Hub select uses the alias hub, or link when the PIT is built on a Link. The Satellite select has no alias. This sample is written for a SQL Server target. On Snowflake the PIT procedure is JavaScript, so a Snowflake project sets the lag with CustomOutput.DvPitLagSql = @"lag_days = -7"; in place of SET @Lag = -7, which stops the build there with an error that names the object and the extension point file.
Example
Before (default generated PIT procedure fragment):
CREATE PROC [dv].[flex_PIT_Customer]
AS
SET NOCOUNT ON
DECLARE @Lag INT = -1;
-- ... the select of the Hub keys ...
WHERE hub.[Customer_SK] <> @defaultKey
AND hub.[FlexRowEffectiveFromDate] >= @cur_from_date
AND keys.[Customer_SK] IS NULL
After (with DvPitAddParameter, DvPitLagSql, and DvPitHubWhereSql applied):
CREATE PROC [dv].[flex_PIT_Customer]
@TenantCode VARCHAR(10) = NULL
AS
SET NOCOUNT ON
DECLARE @Lag INT = -1;
SET @Lag = -7
-- ... the select of the Hub keys ...
WHERE hub.[FlexRowRecordSource] = 'AWLT'
AND hub.[Customer_SK] <> @defaultKey
AND hub.[FlexRowEffectiveFromDate] >= @cur_from_date
AND keys.[Customer_SK] IS NULL
Common Mistakes
- Setting
DvPitOverrideSqlwhile also setting individual fragment outputs -- Symptom: the outputs that shape the procedure are ignored, becauseDvPitOverrideSqlreplaces the whole generated procedure script, including the statement that creates the procedure, whileDvPitColumnElementsstill adds its column to the table. On Databricks and a Fabric lakehouseDvPitOverrideSqlhas no effect andDvPitColumnElementsadds no column to the table. Fix: use eitherDvPitOverrideSqlor the granular outputs, not both. - Expecting
DvPitTargetAddInsertorDvPitTargetAddSelectto load an added column -- Symptom: the column thatDvPitColumnElementsadds to the PIT table is not loaded: it stays NULL, or holds its default if the column element sets one, and a column withIsNullable="false"and no default makes the load's insert fail. Fix: BimlFlex does not read these two outputs; to load the column, replace the load withDvPitOverrideSql. - Malformed XML in
DvPitColumnElements-- Symptom: BimlScript compilation error during build. Fix: ensure the column element is valid Biml XML, e.g.,<Column Name="TenantCode" DataType="AnsiString" Length="10" IsNullable="true" />. - Starting
DvPitHubWhereSqlorDvPitSatWhereSqlwithAND-- Symptom: the Satellite select is not valid SQL, and the Hub filter lands in a join condition where it does not filter the rows. Fix: start each of these fragments withWHERE. It takes the place of theWHEREkeyword, and BimlFlex adds its own conditions after it withAND. - Setting
DvPitDeleteWhereSqlorDvPitDeleteOverrideWhereSql-- Symptom: nothing changes in the generated code. Fix: BimlFlex does not read these two outputs; remove them.
Related Extension Points
- DvPitPreProcessSql / DvPitPostProcessSql -- use these to add setup or cleanup steps around the PIT load rather than modifying the core query logic.
- DvBridgeSql -- the Bridge equivalent of this extension point; use when building Bridge tables instead of PIT tables.
- DvPreProcessSql / DvPostProcessSql -- for wrapping the main Data Vault load (Hub, Link, Satellite) procedures; these do not affect PIT objects.
Data Vault Pit Post Process SQL
Configure SQL to be injected after the Point In Time Query
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPitPostProcessSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment that executes after the PIT table load query completes, at the end of the generated stored procedure, or the generated notebook on Databricks. On a Fabric lakehouse it is placed as a Python cell of the control notebook, as Where It Fires describes. This is useful for post-load audit logging, index rebuilds, statistics updates, or data quality validation on the freshly loaded PIT table. The generated load opens no transaction around the PIT load and this SQL.
Where It Fires
Consumed as a pre/post process SQL wrapper for PIT table generation. The SQL fragment is appended at the end of the generated stored procedure, after the main PIT MERGE statement and the drop of its keys table, and at the same place in the Databricks notebook that holds the merge. On a Fabric lakehouse the text is placed as its own Python cell of the control notebook, after the cell that runs the merge, so write it as Python there. Applied only to objects with a PIT table type. Supports SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics, Fabric Data Warehouse, Fabric SQL database and Snowflake, where the PIT load is a stored procedure, and Databricks and a Fabric lakehouse, where it is a notebook.
When to Use It
- Log the row count and load completion timestamp for
dv.PIT_Customerto an audit table -- use this instead of a separate orchestration step so the logging stays within the PIT load. - Rebuild clustered columnstore indexes on the PIT table after a full refresh to optimize query performance for downstream reporting.
- Run a validation query that checks the PIT table for duplicate surrogate key entries and logs any anomalies.
- Update a watermark or control table to record the latest successful PIT refresh for the
LOAD_BFX_DVbatch.
Prerequisites
- Target object must be a PIT type in BimlFlex metadata.
- The
BFX_DVconnection must be configured. - The SQL fragment must be valid for the target platform (e.g., T-SQL for MSSQL, Snowflake SQL for SFLDW).
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPitPostProcessSqland thetargetattribute to your PIT object. - Write the SQL fragment that should execute after the PIT load.
- Build and review the generated stored procedure, or the generated notebook on Databricks and a Fabric lakehouse, to confirm placement.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPitPostProcessSql" target="PIT_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
INSERT INTO dv.AuditLog (ObjectName, RowsAffected, LoadDate)
SELECT 'PIT_Customer', COUNT(*), GETDATE() FROM dv.PIT_Customer;
UPDATE STATISTICS dv.PIT_Customer;
Example
Before (end of generated PIT procedure on SQL Server):
-- ... PIT MERGE completes and the keys table is dropped ...
GO
After (with DvPitPostProcessSql applied):
-- ... PIT MERGE completes and the keys table is dropped ...
INSERT INTO dv.AuditLog (ObjectName, RowsAffected, LoadDate)
SELECT 'PIT_Customer', COUNT(*), GETDATE() FROM dv.PIT_Customer;
UPDATE STATISTICS dv.PIT_Customer;
GO
Common Mistakes
- Reading
@@ROWCOUNTto log the rows of the PIT load -- Symptom: the audit log does not show the number of rows that the PIT merge wrote, even when@@ROWCOUNTis read in the first statement, because on SQL Server the generated procedure drops its keys table after the merge and before this SQL. Fix: log a count that does not depend on@@ROWCOUNT, such as the row count of the PIT table itself, as the sample above does. - Running ALTER INDEX REBUILD on a large PIT table without sufficient maintenance window -- Symptom: long-running blocking operation. Fix: use
ALTER INDEX REORGANIZEfor online maintenance or schedule full rebuilds during off-hours. - Placing logic that depends on pre-load state in PostProcess instead of PreProcess -- Symptom: the check sees post-load data and produces incorrect results. Fix: move pre-load checks to
DvPitPreProcessSql.
Related Extension Points
- DvPitPreProcessSql -- the counterpart that runs before the PIT query; use together for setup/teardown patterns.
- DvPitSql -- for modifying the PIT query logic itself (column selection, WHERE conditions, parameters) rather than adding steps before or after.
- DvBridgePostProcessSql -- the equivalent post-process hook for Bridge tables.
Data Vault Pit Pre Process SQL
Configure SQL to be injected before the Point In Time Query
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPitPreProcessSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment that executes before the PIT table load query, at the start of the generated stored procedure, or before the keys table statements and the merge in the generated notebook on Databricks. On a Fabric lakehouse it is placed as a Python cell of the control notebook, as Where It Fires describes. This is commonly used for creating temporary staging tables, setting session variables, truncating the PIT table for a full rebuild, or capturing pre-load state for comparison after the load completes. The generated load opens no transaction around this SQL and the PIT load.
Where It Fires
Consumed as a pre/post process SQL wrapper for PIT table generation. The SQL fragment is inserted at the start of the generated stored procedure, before the lag and date statements, the keys table statements and the main PIT MERGE statement, and before the keys table statements and the merge statement in the Databricks notebook that holds the merge. On a Fabric lakehouse the text is placed as its own Python cell of the control notebook, before the cell that sets the lag and dates and runs the merge, so write it as Python there. Applied only to objects with a PIT table type. Supports SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics, Fabric Data Warehouse, Fabric SQL database and Snowflake, where the PIT load is a stored procedure, and Databricks and a Fabric lakehouse, where it is a notebook.
When to Use It
- Truncate
dv.PIT_Customerbefore a full rebuild -- use this instead of a separate orchestration step when the PIT table should always be fully refreshed. - Create a temporary table to capture the current PIT row count for comparison in
DvPitPostProcessSql. - Set session-level options that affect query behavior, such as
SET LOCK_TIMEOUTfor large PIT loads againstBFX_DV. - Log the PIT load start time to an audit table for monitoring the
LOAD_BFX_DVbatch execution.
Prerequisites
- Target object must be a PIT type in BimlFlex metadata.
- The
BFX_DVconnection must be configured. - The SQL fragment must be valid for the target platform.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPitPreProcessSqland thetargetattribute to your PIT object. - Write the SQL fragment that should execute before the PIT load.
- Build and review the generated stored procedure, or the generated notebook on Databricks and a Fabric lakehouse, to confirm placement.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPitPreProcessSql" target="PIT_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
TRUNCATE TABLE dv.PIT_Customer;
INSERT INTO dv.AuditLog (ObjectName, EventType, EventDate)
SELECT 'PIT_Customer', 'PitLoadStart', GETDATE();
Example
Before (start of generated PIT procedure on SQL Server):
CREATE PROC [dv].[flex_PIT_Customer]
AS
SET NOCOUNT ON
DECLARE @Lag INT = -1;
-- ... PIT MERGE begins ...
After (with DvPitPreProcessSql applied):
CREATE PROC [dv].[flex_PIT_Customer]
AS
SET NOCOUNT ON
TRUNCATE TABLE dv.PIT_Customer;
INSERT INTO dv.AuditLog (ObjectName, EventType, EventDate)
SELECT 'PIT_Customer', 'PitLoadStart', GETDATE();
DECLARE @Lag INT = -1;
-- ... PIT MERGE begins ...
Common Mistakes
- Truncating a PIT table referenced by active dashboard queries -- Symptom: users see empty results during the refresh window. Fix: use a swap-table pattern (load into a staging copy, then rename) or schedule PIT refreshes during off-hours.
- Creating temp tables with names that collide with BimlFlex-generated temp tables -- Symptom: unexpected data or errors. Fix: use a distinctive naming prefix like
#ep_for extension point temp tables. - Adding logic that should run after the load -- Symptom: the SQL executes on stale PIT data. Fix: move post-load logic to
DvPitPostProcessSql.
Related Extension Points
- DvPitPostProcessSql -- the counterpart that runs after the PIT query; use together for setup/teardown patterns.
- DvPitSql -- for modifying the PIT query logic itself rather than adding steps before or after it.
- DvBridgePreProcessSql -- the equivalent pre-process hook for Bridge tables.
Data Vault Post Process SQL
Configure SQL to be injected at the end of the Data Vault stored procedure
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the target object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPostProcessSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment after all the Hub, Link, and Satellite loads that BimlFlex generates for one source object. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake these loads are one stored procedure, and the fragment follows the last load, before the procedure ends. On Databricks and a Fabric lakehouse the control notebook of the source object runs the fragment after the loads. This is the outermost post-processing hook for the core Data Vault load and is ideal for final audit logging, notification triggers, post-load cleanup, or orchestration control-flow updates.
Where It Fires
Placed once for each source object, in the load of all the Hub, Link, Satellite, and Reference objects mapped from it. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake the fragment goes into the generated stored procedure after the last load. When the Use Transactions setting adds a transaction to the procedure, the fragment runs after that transaction commits. On Snowflake the procedure is JavaScript and the fragment is placed in it as written, so write it as JavaScript. On Databricks and a Fabric lakehouse the control notebook of the source object runs the fragment after the loads.
When to Use It
- Log the completion of a Satellite load (e.g.,
dv.SAT_Customer_Details_awlt) to an audit table with row counts and timestamps -- use this instead of adding orchestration-level logging when you want the audit record written by the generated load itself. When Use Transactions adds a transaction to the procedure, the fragment runs after it has committed, not inside it. - Execute post-load data quality checks against
dv.HUB_Customerto verify no duplicate business keys were inserted during the load fromBFX_STG. - Update a control or watermark table to signal that the Data Vault load step in the
LOAD_BFX_DVbatch has completed successfully. - Send a Service Broker message or insert into a queue table to trigger downstream processing of the loaded Data Vault objects.
- Rebuild indexes on Satellite tables after large delta loads -- use this instead of
DvPitPostProcessSqlorDvBridgePostProcessSqlwhen the target is a core Data Vault object, not a PIT or Bridge.
Prerequisites
- Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
- The
BFX_DVconnection must be configured with the appropriate Data Vault target database. - The SQL fragment must be valid for the target platform.
- Does not apply to PIT or Bridge objects -- use
DvPitPostProcessSqlorDvBridgePostProcessSqlfor those.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPostProcessSqland thetargetattribute to your Data Vault object. - Write the SQL that should execute after the Data Vault load completes.
- Build and review the generated stored procedure or notebooks to confirm the SQL appears after the last Hub, Link, or Satellite load.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPostProcessSql" target="SAT_Customer_Details_awlt" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
INSERT INTO dv.AuditLog (ObjectName, RowsAffected, EventType, LoadDate)
SELECT 'SAT_Customer_Details_awlt', COUNT(*), 'DvLoadComplete', GETDATE() FROM dv.SAT_Customer_Details_awlt;
Example
Before (end of generated DV stored procedure):
-- ... Hub/Link MERGE and Satellite INSERT complete ...
END
After (with DvPostProcessSql applied):
-- ... Hub/Link MERGE and Satellite INSERT complete ...
INSERT INTO dv.AuditLog (ObjectName, RowsAffected, EventType, LoadDate)
SELECT 'SAT_Customer_Details_awlt', COUNT(*), 'DvLoadComplete', GETDATE() FROM dv.SAT_Customer_Details_awlt;
END
Common Mistakes
- Using this extension point for PIT or Bridge objects -- Symptom: the extension point is ignored; no SQL appears in the generated procedure. Fix: use
DvPitPostProcessSqlorDvBridgePostProcessSqlfor PIT and Bridge objects respectively. - Reading
@@ROWCOUNTto log the rows of a load -- Symptom: the audit log does not show the number of rows that the load wrote, even when@@ROWCOUNTis read in the first statement, because on SQL Server, when the last load of the source object is a Satellite or Reference load, the generated procedure drops the temporary tables of that load, and commits the transaction when Use Transactions is on, before this SQL.@@ROWCOUNTholds the count of the last load only when that load is a Hub or Link. Fix: log a count that does not depend on@@ROWCOUNT, such as the row count of the Satellite table itself, as the sample above does, or read@@ROWCOUNTinDvPostTargetSqlright after the load of a Hub or Link. - Setting
ObjectInherit = truewithout realizing it applies to all objects in the batch -- Symptom: the same post-process SQL runs for every Hub, Link, and Satellite inLOAD_BFX_DV. Fix: useObjectInherit = falseand target specific objects, or use BimlScript conditionals to filter by object type. - Confusing DvPostProcessSql with DvPostTargetSql -- Symptom: SQL appears in the wrong location. Fix:
DvPostProcessSqlruns once, after all the loads of the source object, whileDvPostTargetSqlruns after the load of one Hub, Link, or Satellite.
Related Extension Points
- DvPreProcessSql -- the counterpart that runs before the Hub, Link, and Satellite loads. Use them together for setup and teardown patterns.
- DvPostTargetSql -- runs after the load of one Hub, Link, or Satellite, not after all the loads.
- DvPostSourceSql -- runs after the staging query, where the load has one, and before the Hub, Link, and Satellite loads (on Databricks and a Fabric lakehouse only for a Staged Object source).
- DvPitPostProcessSql / DvBridgePostProcessSql -- the equivalent hooks for PIT and Bridge objects.
Data Vault Post Source SQL
Configure SQL to be injected after the staging query in the Data Vault stored procedure
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the target object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPostSourceSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment into the generated Data Vault load of a source object, after the staging query, where the load has one, and before the Hub, Link, and Satellite loads (on Databricks and a Fabric lakehouse only for a Staged Object source). A Staged Object source always has a staging query, and on Databricks and a Fabric lakehouse no other source has one. On other targets another source has one only when Stage On Extract is off, the source is not persistently staged (its project has no Persistent Stage Connection, or Not Persistent is checked on the source object), and the source is on an Azure Blob Storage or Azure Data Lake Store connection or the Data Vault is on Snowflake or Azure Synapse Analytics. Where the load has a staging query the Hub, Link, and Satellite loads read the temporary table or view it fills, and where it has none, on every target but Databricks and a Fabric lakehouse, they read the staging table directly. Use this extension point to check, log, or adjust the staged data before the loads read it.
Where It Fires
Placed once for each source object. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake the fragment goes into the generated stored procedure after the DvPreSourceSql fragment and the staging query, when there is one, and before the first Hub, Link, or Satellite load. On Snowflake the procedure is JavaScript and the fragment is placed in it as written, so write it as JavaScript. On Databricks and a Fabric lakehouse the fragment is placed only for a Staged Object source, after the query that stages it, and on a Fabric lakehouse it is placed as written in a Python cell, so write it as Python.
When to Use It
- Add a post-source data quality check that validates the staged data before the Hub, Link, and Satellite loads -- for example, verifying that no NULL business keys exist in the staging data for
dv.HUB_Customer. - Copy the staged rows into an additional audit or debug table for troubleshooting load issues -- use this instead of adding a separate logging step in orchestration.
- Apply additional filtering or transformation to the temporary table or view that the staging query fills, where the load has one, before the Hub, Link, and Satellite loads read it.
- Log the count of records retrieved from
BFX_STGfor the current load cycle ofSalesLT.Customerdata into the Data Vault.
Prerequisites
- Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
- The
BFX_DVconnection andBFX_STG(or equivalent staging connection) must be configured. - Familiarity with the generated load is recommended -- where the load has a staging query the Hub, Link, and Satellite loads read the temporary table or view it fills, and where it has none, on every target but Databricks and a Fabric lakehouse, they read the staging table directly.
- Does not apply to PIT or Bridge objects.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPostSourceSqland thetargetattribute to your Data Vault object. - Write the SQL fragment that should execute after the source query.
- Build and review the generated stored procedure or notebooks to verify placement before the first Hub, Link, or Satellite load.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPostSourceSql" target="HUB_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
-- Validate no NULL business keys before Hub insert
IF EXISTS (SELECT 1 FROM #SrcData WHERE [Customer_BK] IS NULL)
BEGIN
RAISERROR('NULL business key detected in staging data for HUB_Customer', 16, 1);
RETURN;
END
Example
Before (generated procedure for a Staged Object source, with its staging query and the Hub load):
-- Source query populates temp table
SELECT [Customer_BK], [FlexRowHashType1], ...
INTO #SrcData
FROM [BFX_STG].[awlt].[SalesLT_Customer]
-- Hub load: MERGE that inserts new keys
MERGE INTO [dv].[HUB_Customer] TGT USING (SELECT ... FROM #SrcData ...) INS
ON ... WHEN NOT MATCHED THEN INSERT ...
After (with DvPostSourceSql applied):
-- Source query populates temp table
SELECT [Customer_BK], [FlexRowHashType1], ...
INTO #SrcData
FROM [BFX_STG].[awlt].[SalesLT_Customer]
-- Validate no NULL business keys before Hub insert
IF EXISTS (SELECT 1 FROM #SrcData WHERE [Customer_BK] IS NULL)
BEGIN
RAISERROR('NULL business key detected in staging data for HUB_Customer', 16, 1);
RETURN;
END
-- Hub load: MERGE that inserts new keys
MERGE INTO [dv].[HUB_Customer] TGT USING (SELECT ... FROM #SrcData ...) INS
ON ... WHEN NOT MATCHED THEN INSERT ...
Common Mistakes
- Modifying the staging temporary table in a way that breaks the downstream loads -- Symptom: column mismatch or missing data in the target. Fix: add columns rather than removing them, or use a separate temp table for your logic.
- Confusing DvPostSourceSql with DvPostProcessSql -- Symptom: SQL appears at the wrong location. Fix:
DvPostSourceSqlruns before the Hub, Link, and Satellite loads, andDvPostProcessSqlruns after them. - Using RAISERROR without RETURN -- Symptom: the procedure continues to the Hub, Link, and Satellite loads despite the error. Fix: follow RAISERROR with RETURN to halt execution.
- Applying this to PIT or Bridge objects -- Symptom: the extension point is ignored. Fix: PIT and Bridge objects have their own extension points (
DvPitSql,DvBridgeSql).
Related Extension Points
- DvPreSourceSql -- runs before the staging query, where the load has one. Use the two together to bracket it with pre and post logic.
- DvPostTargetSql -- runs after the load of one Hub, Link, or Satellite. Use it when you need to act on the data after it has been written.
- DvPostProcessSql -- runs after all the Hub, Link, and Satellite loads. Use it for final cleanup or logging.
Data Vault Post Target SQL
Configure SQL to be injected after the target insert query in the Data Vault stored procedure
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPostTargetSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment after the load of one Hub, Link, or Satellite in the generated Data Vault load. For a Hub or Link the fragment follows the MERGE that inserts the new keys. For a Satellite it follows the INSERT of the new rows and, when End Date Satellite is on, the end-dating statements. It runs before the DvPostProcessSql fragment. It is useful for capturing load metrics, performing immediate post-load validation, or triggering dependent operations that need to act on freshly loaded data.
Where It Fires
Placed for each Hub, Link, Satellite, and Reference object in the load of each source object mapped to it. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake the fragment goes into the generated stored procedure of the source object, and on Snowflake it is placed as written in the JavaScript of that procedure, so write it as JavaScript. On Databricks it goes into the notebook that loads the object. On a Fabric lakehouse it is placed as written in a Python cell of the notebook that loads the object, so write it as Python. A fragment for a Hub also follows the MERGE that adds keys to that Hub inside a Link load, when the Link infers Hub keys.
When to Use It
- Capture
@@ROWCOUNTright after a Hub or Link MERGE to log how many new keys were written todv.HUB_Customer-- use this instead ofDvPostProcessSqlwhen you need the row count before other statements reset it. For a Satellite with End Date Satellite on, the end-dating statements run between the INSERT and this fragment. - Run a referential integrity check to verify that every row inserted into
dv.LNK_SalesOrderhas matching Hub keys indv.HUB_Customer. - Trigger a dependent operation such as updating a materialized view or refreshing a cache immediately after the Hub insert.
- Insert newly loaded business keys into a processing queue for downstream consumption by the
LOAD_BFX_DVbatch.
Prerequisites
- Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
- The
BFX_DVconnection must be configured. - Familiarity with the distinction between
DvPostTargetSql(after the load of one object) andDvPostProcessSql(after all the loads) is important. - Does not apply to PIT or Bridge objects.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPostTargetSqland thetargetattribute to your Data Vault object. - Write the SQL fragment that should execute after the load of the object.
- Build and review the generated stored procedure or notebook to verify placement.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPostTargetSql" target="SAT_Customer_Details_awlt" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
DECLARE @InsertedRows INT = @@ROWCOUNT;
INSERT INTO dv.AuditLog (ObjectName, RowsInserted, EventType, LoadDate)
SELECT 'SAT_Customer_Details_awlt', @InsertedRows, 'PostTargetInsert', GETDATE();
Example
Before (generated procedure target INSERT section):
-- Target INSERT into Satellite
INSERT INTO [dv].[SAT_Customer_Details_awlt] ([Customer_SK], [FlexRowHashType1], ...)
SELECT [Customer_SK], [FlexRowHashType1], ...
FROM #SrcData src
WHERE NOT EXISTS (SELECT 1 FROM [dv].[SAT_Customer_Details_awlt] tgt WHERE ...)
-- ... procedure continues ...
After (with DvPostTargetSql applied):
-- Target INSERT into Satellite
INSERT INTO [dv].[SAT_Customer_Details_awlt] ([Customer_SK], [FlexRowHashType1], ...)
SELECT [Customer_SK], [FlexRowHashType1], ...
FROM #SrcData src
WHERE NOT EXISTS (SELECT 1 FROM [dv].[SAT_Customer_Details_awlt] tgt WHERE ...)
DECLARE @InsertedRows INT = @@ROWCOUNT;
INSERT INTO dv.AuditLog (ObjectName, RowsInserted, EventType, LoadDate)
SELECT 'SAT_Customer_Details_awlt', @InsertedRows, 'PostTargetInsert', GETDATE();
-- ... procedure continues ...
Common Mistakes
- Confusing DvPostTargetSql with DvPostProcessSql -- Symptom: SQL appears after all the loads instead of after the load of one object. Fix: use
DvPostTargetSqlfor logic that must run right after the load of a Hub, Link, or Satellite, andDvPostProcessSqlfor logic after all the loads. - Not capturing
@@ROWCOUNTas the first statement -- Symptom:@@ROWCOUNTreturns the count from your first SQL statement, not the load. Fix: always declare a variable and capture@@ROWCOUNTin the very first line. For a Satellite with End Date Satellite on, the end-dating statements run before this fragment, so@@ROWCOUNTholds their count, not the INSERT count. - Running expensive queries against the target table immediately after insert -- Symptom: performance degradation or blocking. Fix: keep post-target logic lightweight; defer heavy operations to
DvPostProcessSqlor a separate step.
Related Extension Points
- DvPreTargetSql -- runs before the load of the object. Use the two together to bracket the load.
- DvPostSourceSql -- runs after the staging query, where the load has one, and before all the Hub, Link, and Satellite loads of the source object (on Databricks and a Fabric lakehouse only for a Staged Object source).
- DvPostProcessSql -- runs after all the Hub, Link, and Satellite loads. Use it for final cleanup or logging.
Data Vault Pre Process SQL
Configure SQL to be injected at the start of the Data Vault stored procedure
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the target object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPreProcessSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment before all the Hub, Link, and Satellite loads that BimlFlex generates for one source object. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake these loads are one stored procedure, and the fragment follows the procedure header, before the DvPreSourceSql fragment and the first load. On Databricks and a Fabric lakehouse the control notebook of the source object runs the fragment before the loads. In a stored procedure this is the outermost pre-processing hook for the core Data Vault load and is ideal for session configuration, variable initialization, creating temporary tables, or logging the start of a load cycle.
Where It Fires
Placed once for each source object, in the load of all the Hub, Link, Satellite, and Reference objects mapped from it. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake the fragment goes into the generated stored procedure after its header and before the first load. On Snowflake the procedure is JavaScript and the fragment is placed in it as written, so write it as JavaScript. On Databricks and a Fabric lakehouse the control notebook of the source object runs the fragment before the loads.
When to Use It
- Set session-level options such as
SET NOCOUNT ON,SET XACT_ABORT ON, orSET LOCK_TIMEOUTthat should apply to the entire Data Vault load procedure fordv.HUB_Customerordv.SAT_Customer_Details_awlt. - Declare and initialize variables that will be referenced by other extension points later in the procedure (e.g., a
@LoadBatchIdvariable used by bothDvPostSourceSqlandDvPostProcessSql). - Create temporary tables or table variables that will be populated and consumed during the load -- in a stored procedure a temporary table created here stays available to the rest of the procedure.
- Log the start of the Data Vault load for the current object to an audit table within the
LOAD_BFX_DVbatch. - Execute a pre-flight check (e.g., verify the staging table has data) and abort early if conditions are not met -- use this instead of orchestration-level checks when you want the logic embedded in the generated procedure.
- Prepare hub lookup tables before Data Vault loading begins. Insert SQL that populates or refreshes a temporary lookup table with the latest hub keys before the generated Hub, Link, and Satellite loads start, for use by your own extension point SQL later in the load.
- Run a SQL-based data quality check before DV processing. Add a pre-process SQL fragment that validates referential integrity between staging and the target hub -- logging orphan records to an error table and optionally aborting the load if the error count exceeds a threshold.
Prerequisites
- Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
- The
BFX_DVconnection must be configured. - Does not apply to PIT or Bridge objects -- use
DvPitPreProcessSqlorDvBridgePreProcessSqlfor those.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPreProcessSqland thetargetattribute to your Data Vault object. - Write the SQL that should execute at the start of the procedure.
- Build and review the generated stored procedure or notebooks to confirm the SQL appears before the first Hub, Link, or Satellite load.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPreProcessSql" target="HUB_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
SET XACT_ABORT ON;
DECLARE @LoadBatchId UNIQUEIDENTIFIER = NEWID();
INSERT INTO dv.AuditLog (ObjectName, BatchId, EventType, LoadDate)
SELECT 'HUB_Customer', @LoadBatchId, 'DvLoadStart', GETDATE();
Example
Before (start of generated DV stored procedure):
CREATE PROCEDURE [dv].[usp_HUB_Customer]
AS
BEGIN
-- Source query begins ...
After (with DvPreProcessSql applied):
CREATE PROCEDURE [dv].[usp_HUB_Customer]
AS
BEGIN
SET XACT_ABORT ON;
DECLARE @LoadBatchId UNIQUEIDENTIFIER = NEWID();
INSERT INTO dv.AuditLog (ObjectName, BatchId, EventType, LoadDate)
SELECT 'HUB_Customer', @LoadBatchId, 'DvLoadStart', GETDATE();
-- Source query begins ...
Common Mistakes
- Using this extension point for PIT or Bridge objects -- Symptom: the extension point is ignored. Fix: use
DvPitPreProcessSqlorDvBridgePreProcessSqlfor PIT and Bridge objects respectively. - Declaring variables that conflict with BimlFlex-generated variable names -- Symptom: "variable already declared" error during procedure creation. Fix: use a distinctive naming prefix like
@ep_for extension point variables, and review the generated procedure to check for conflicts. - Placing post-load logic in PreProcess -- Symptom: the logic runs on stale data from the previous load. Fix: move result-dependent logic to
DvPostProcessSqlorDvPostTargetSql. - Setting
ObjectInherit = truewhen only one object needs pre-processing -- Symptom: the pre-process SQL runs for every Hub, Link, and Satellite in theLOAD_BFX_DVbatch. Fix: useObjectInherit = falseand set thetargetattribute to the specific object.
Related Extension Points
- DvPostProcessSql -- the counterpart that runs after all the Hub, Link, and Satellite loads. Use them together for setup and teardown patterns.
- DvPreSourceSql -- in a stored procedure it directly follows this fragment, before the staging query when there is one. On Databricks and a Fabric lakehouse it is placed only for a Staged Object source, before the query that stages it.
- DvPreTargetSql -- runs before the load of one Hub, Link, or Satellite.
- DvPitPreProcessSql / DvBridgePreProcessSql -- the equivalent hooks for PIT and Bridge objects.
Data Vault Pre Source SQL
Configure SQL to be injected before the staging query in the Data Vault stored procedure
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the target object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPreSourceSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment into the generated Data Vault load of a source object, before the staging query, where the load has one, and before the Hub, Link, and Satellite loads (on Databricks and a Fabric lakehouse only for a Staged Object source). A Staged Object source always has a staging query, and on Databricks and a Fabric lakehouse no other source has one. On other targets another source has one only when Stage On Extract is off, the source is not persistently staged (its project has no Persistent Stage Connection, or Not Persistent is checked on the source object), and the source is on an Azure Blob Storage or Azure Data Lake Store connection or the Data Vault is on Snowflake or Azure Synapse Analytics. Where the load has a staging query the Hub, Link, and Satellite loads read the temporary table or view it fills, and where it has none, on every target but Databricks and a Fabric lakehouse, they read the staging table directly. This extension point lets you set up temporary structures or execute preparatory logic before the staging data is read.
Where It Fires
Placed once for each source object. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake the fragment goes into the generated stored procedure right after the DvPreProcessSql fragment, before the staging query when there is one, and before the first Hub, Link, or Satellite load. On Snowflake the procedure is JavaScript and the fragment is placed in it as written, so write it as JavaScript. On Databricks and a Fabric lakehouse the fragment is placed only for a Staged Object source, before the query that stages it, and on a Fabric lakehouse it is placed as written in a Python cell, so write it as Python.
When to Use It
- Create an index on the staging table before the source query executes to improve join performance when loading
dv.HUB_CustomerfromBFX_STG-- use this instead of permanently indexing staging tables when indexes are only needed during the DV load window. - Populate a lookup temp table that your own SQL later in the load references -- for example, a list of valid customer IDs used to check the
SalesLT.Customerstaging data before it reaches the Hub. - Update statistics on the staging table to ensure the query optimizer makes good choices for the queries of the load against
BFX_STG. - Log the pre-source state (e.g., record counts in staging) for later comparison with
DvPostSourceSql.
Prerequisites
- Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
- The
BFX_DVandBFX_STGconnections must be configured. - Understanding of where this SQL lands relative to
DvPreProcessSqlis important: in a stored procedureDvPreSourceSqldirectly followsDvPreProcessSql, and on Databricks and a Fabric lakehouse it is placed only for a Staged Object source. - Does not apply to PIT or Bridge objects.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPreSourceSqland thetargetattribute to your Data Vault object. - Write the SQL fragment that should execute before the source query.
- Build and review the generated stored procedure or notebooks to verify placement.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPreSourceSql" target="HUB_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
-- Create temp index on staging table for join performance
CREATE NONCLUSTERED INDEX IX_STG_Customer_BK
ON [BFX_STG].[awlt].[SalesLT_Customer] ([CustomerID])
WITH (DATA_COMPRESSION = PAGE);
Example
Before (generated procedure source query section):
-- ... procedure start and DvPreProcessSql ...
-- Source query
SELECT [Customer_BK], [FlexRowHashType1], ...
INTO #SrcData
FROM [BFX_STG].[awlt].[SalesLT_Customer]
After (with DvPreSourceSql applied):
-- ... procedure start and DvPreProcessSql ...
-- Create temp index on staging table for join performance
CREATE NONCLUSTERED INDEX IX_STG_Customer_BK
ON [BFX_STG].[awlt].[SalesLT_Customer] ([CustomerID])
WITH (DATA_COMPRESSION = PAGE);
-- Source query
SELECT [Customer_BK], [FlexRowHashType1], ...
INTO #SrcData
FROM [BFX_STG].[awlt].[SalesLT_Customer]
Common Mistakes
- Creating indexes that persist after the procedure and accumulate over time -- Symptom: staging table performance degrades due to excessive indexes. Fix: use
DvPostSourceSqlto drop the index after the source query completes. - Confusing DvPreSourceSql with DvPreProcessSql -- Symptom: SQL appears at the wrong location. Fix: in a stored procedure
DvPreProcessSqlcomes first andDvPreSourceSqldirectly follows it, and on Databricks and a Fabric lakehouseDvPreSourceSqlis placed only for a Staged Object source. - Modifying staging data in place (UPDATE/DELETE on the staging table) -- Symptom: other objects that reference the same staging table see modified data. Fix: use a temp table copy instead of modifying the shared staging table.
Related Extension Points
- DvPostSourceSql -- runs after the staging query, where the load has one. Use the two together to bracket it with setup and teardown logic.
- DvPreProcessSql -- runs once, before all the Hub, Link, and Satellite loads, and in a stored procedure directly before this fragment. Use it for session-level setup that applies to the entire procedure.
- DvPreTargetSql -- runs before the load of one Hub, Link, or Satellite, not before the staging query.
Data Vault Pre Target SQL
Configure SQL to be injected before the target source query in the Data Vault stored procedure
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPreTargetSql" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
/* Add your SQL fragment here */
What It Does
Injects a custom SQL fragment before the load of one Hub, Link, or Satellite in the generated Data Vault load. For a Hub or Link the fragment comes before the MERGE that inserts the new keys, and in a stored procedure a Link fragment also comes before the loads of the Hub keys that the Link infers. For a Satellite it comes before all the statements of the Satellite load, including the temporary tables built from the staging data and the INSERT. It runs after the DvPostSourceSql fragment. It is useful for disabling constraints or triggers on the target table or preparing the target for the load.
Where It Fires
Placed for each Hub, Link, Satellite, and Reference object in the load of each source object mapped to it. On SQL Server, Azure SQL Database, Azure SQL Managed Instance, Azure Synapse Analytics and Snowflake the fragment goes into the generated stored procedure of the source object, and on Snowflake it is placed as written in the JavaScript of that procedure, so write it as JavaScript. On Databricks it goes into the notebook that loads the object. On a Fabric lakehouse it is placed as written in a Python cell of the notebook that loads the object, so write it as Python. A fragment for a Hub also comes before the MERGE that adds keys to that Hub inside a Link load, when the Link infers Hub keys.
When to Use It
- Disable non-clustered indexes on the Satellite table before a large initial load to improve insert performance -- for example, disabling indexes on
dv.SAT_Customer_Details_awltand rebuilding them viaDvPostTargetSql. - Disable triggers on the target table that should not fire during the ELT load process.
- Apply a final transformation (e.g., deduplication) to the staging temporary table or view, where the load has a staging query, before the MERGE into
dv.HUB_Customer. - Adjust the transaction isolation level before the load of the object. The setting stays in effect for the rest of the procedure.
Prerequisites
- Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
- The
BFX_DVconnection must be configured. - Understanding of the procedure execution order is important:
DvPreProcessSql,DvPreSourceSql, the staging query where there is one, andDvPostSourceSqlrun first. Then each Hub, Link, and Satellite load runs in turn between itsDvPreTargetSqlandDvPostTargetSql.DvPostProcessSqlruns last. - Does not apply to PIT or Bridge objects.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvPreTargetSqland thetargetattribute to your Data Vault object. - Write the SQL fragment that should execute before the load of the object.
- Build and review the generated stored procedure or notebook to verify placement.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvPreTargetSql" target="SAT_Customer_Details_awlt" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<# CustomOutput.ObjectInherit = false; #>
-- Disable non-clustered indexes for bulk insert performance
ALTER INDEX IX_SAT_Customer_Details_Hash ON dv.SAT_Customer_Details_awlt DISABLE;
Example
Before (generated procedure target INSERT section):
-- ... source query and DvPostSourceSql complete ...
-- Satellite load: temporary tables from the staging data, then the INSERT
INSERT INTO [dv].[SAT_Customer_Details_awlt] ([Customer_SK], [FlexRowHashType1], ...)
SELECT ...
After (with DvPreTargetSql applied):
-- ... source query and DvPostSourceSql complete ...
-- Disable non-clustered indexes for bulk insert performance
ALTER INDEX IX_SAT_Customer_Details_Hash ON dv.SAT_Customer_Details_awlt DISABLE;
-- Satellite load: temporary tables from the staging data, then the INSERT
INSERT INTO [dv].[SAT_Customer_Details_awlt] ([Customer_SK], [FlexRowHashType1], ...)
SELECT ...
Common Mistakes
- Disabling indexes without re-enabling them in DvPostTargetSql -- Symptom: downstream queries fail or perform poorly because indexes remain disabled. Fix: always pair
ALTER INDEX ... DISABLEinDvPreTargetSqlwithALTER INDEX ... REBUILDinDvPostTargetSql. - Confusing DvPreTargetSql with DvPreSourceSql -- Symptom: SQL runs once before all the loads instead of before the load of one object. Fix: use
DvPreTargetSqlfor logic before the load of a Hub, Link, or Satellite andDvPreSourceSqlfor logic before the staging query. - Dropping the staging temporary table that the loads read from -- Symptom: "Invalid object name" error during the load. Fix: never drop or truncate the staging temporary table in
DvPreTargetSql.
Related Extension Points
- DvPostTargetSql -- runs after the load of the object. Use the two together to bracket the load (e.g., disable and rebuild indexes).
- DvPreSourceSql -- runs once, before the staging query and all the loads (on Databricks and a Fabric lakehouse only for a Staged Object source). Use it when your setup logic relates to the source read, not the target write.
- DvPreProcessSql -- runs once, before all the Hub, Link, and Satellite loads. In a stored procedure use it for session-level setup.
Data Vault Source Override
Configure override for the Data Vault Source transformation node
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the override will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the target object to which the override will be added |
| inputPath | String | Contains the output path of the preceding task, when there is one |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
| OutputPathName | String | You must add CustomOutput.OutputPathName with the last task to connect it with the next Data Flow task. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvSourceOverride" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<!-- NOTE: The type of source override must be consistent to the connection type. -->
<# CustomOutput.ObjectInherit = false; #>
<OleDbSource Name="OLE_SRC - MyTable" ConnectionName="MY_SRC" CommandTimeout="0" ValidateExternalMetadata="false">
<DirectInput>SELECT [Code], [Name] FROM [dbo].[MyTable]</DirectInput>
<Columns>
<Column SourceColumn="Name" TargetColumn="MyTableName" />
<Column SourceColumn="Code" TargetColumn="MyTableCode" />
</Columns>
<# CustomOutput.OutputPathName = @"OLE_SRC - MyTable"; #>
</OleDbSource>
What It Does
Completely replaces the default SSIS dataflow source component for a Data Vault load package. Instead of using the BimlFlex-generated OLE DB Source or ADO.NET Source that reads from the staging area, you provide your own source component with custom SQL, a different connection, or an entirely different source type. This is an ETL-only (SSIS) extension point that gives you full control over where and how the Data Vault dataflow reads its input data.
Where It Fires
Consumed in 90.flx-i-get-target-source-transformation.biml. This template generates the SSIS dataflow source component for Data Vault objects. When this extension point is defined, it replaces the entire default source node in the dataflow. SSIS-only -- does not apply to ELT/stored procedure patterns (Snowflake, Databricks, Fabric). The CustomOutput.OutputPathName must be set to connect the custom source to the downstream dataflow transformations.
When to Use It
- Read from a different source table or connection than what BimlFlex generates by default -- for example, sourcing
dv.HUB_Customerdata from a pre-processed view inAWLT_SRCinstead of the staging table inBFX_STG. - Apply a custom SQL query with complex joins or filters at the source level -- use this instead of
DvSourcePipelinePrewhen you need to replace the entire source, not just add a transformation after it. - Use a flat file or Excel source for a one-time data migration into the Data Vault when the data does not come from a relational staging area.
- Override the source to read from an ODS connection (
BFX_ODS) for a re-load scenario where data needs to be re-ingested into the Data Vault from an intermediate layer.
Prerequisites
- SSIS (ETL) architecture must be in use. This extension point does not apply to ELT patterns.
- The connection referenced in the source component must be defined in BimlFlex metadata.
CustomOutput.OutputPathNamemust be set to theNameattribute of your source component, without.Output, so downstream transformations can connect.- The source component type must be consistent with the connection type (e.g.,
OleDbSourcefor OLE DB connections,AdoNetSourcefor ADO.NET connections).
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvSourceOverrideand thetargetattribute to your Data Vault object. - Define the replacement source component in Biml XML, including the connection, query, and column mappings.
- Set
CustomOutput.OutputPathNameto theNameattribute of your source component, without.Output. - Build and verify the generated SSIS package in Visual Studio to confirm the source component is wired correctly.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvSourceOverride" target="HUB_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<# CustomOutput.ObjectInherit = false; #>
<OleDbSource Name="OLE_SRC - Customer_Filtered" ConnectionName="AWLT_SRC" CommandTimeout="0" ValidateExternalMetadata="false">
<DirectInput>
SELECT [CustomerID] AS [Customer_BK], [CustomerName]
FROM [SalesLT].[Customer]
WHERE [IsActive] = 1
</DirectInput>
<# CustomOutput.OutputPathName = @"OLE_SRC - Customer_Filtered"; #>
</OleDbSource>
Example
Before (default generated SSIS source component):
<OleDbSource Name="OLE_SRC - BFX_STG_awlt_Customer" ConnectionName="BFX_STG" CommandTimeout="0">
<DirectInput>SELECT * FROM [awlt].[SalesLT_Customer]</DirectInput>
</OleDbSource>
After (with DvSourceOverride applied):
<OleDbSource Name="OLE_SRC - Customer_Filtered" ConnectionName="AWLT_SRC" CommandTimeout="0" ValidateExternalMetadata="false">
<DirectInput>
SELECT [CustomerID] AS [Customer_BK], [CustomerName]
FROM [SalesLT].[Customer]
WHERE [IsActive] = 1
</DirectInput>
</OleDbSource>
Common Mistakes
- Forgetting to set
CustomOutput.OutputPathName-- Symptom: the SSIS package fails validation because downstream transformations have no connected input. Fix: always setCustomOutput.OutputPathNameto theNameattribute of your source component, such as"OLE_SRC - MyTable", without.Output. - Column name or data type mismatches between the custom source and expected downstream columns -- Symptom: SSIS validation errors or data truncation. Fix: ensure column names and types in your custom source match what the downstream transformations expect; use
<Columns>withSourceColumn/TargetColumnmappings to alias if needed. - Using this extension point with ELT architecture -- Symptom: the extension point is ignored and the generated load is unchanged. Fix: for ELT patterns, use
DvPreSourceSql/DvPostSourceSqlto add SQL before or after the staging query (on Databricks and a Fabric lakehouse only for a Staged Object source). - Using an incompatible source component type for the connection -- Symptom: SSIS build error about incompatible connection manager. Fix: match the source component to the connection type (e.g.,
OleDbSourcefor OLE DB,AdoNetSourcefor ADO.NET).
Related Extension Points
- DvSourcePipelinePre / DvSourcePipelinePost -- use these to add transformations after the source in the dataflow rather than replacing the source entirely.
- DvTargetOverride -- the target-side equivalent; replaces the destination component in the SSIS dataflow.
- DvPreSourceSql / DvPostSourceSql -- ELT counterparts that add SQL before and after the staging query, without replacing the source.
Data Vault Source Pipeline Post
Configure pipeline logic that will be injected after the Data Vault source transformations
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the target object to which the pipeline will be added |
| inputPath | String | Contains the output path of the preceding task |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
| OutputPathName | String | You must add CustomOutput.OutputPathName with the last task to connect it with the next Data Flow task. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvSourcePipelinePost" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<!-- This can be any anything defined within the SSIS Data Flow. -->
<DataConversion Name="DCV - Convert MyColumn">
<InputPath OutputPathName="<#=inputPath #>" />
<Columns>
<Column SourceColumn="MyColumn" TargetColumn="cnv_MyColumn" DataType="String" Length="100" />
</Columns>
<# CustomOutput.OutputPathName = @"DCV - Convert MyColumn.Output"; #>
</DataConversion>
What It Does
Injects custom SSIS dataflow transformation components after the Data Vault source-side transformations but before the data reaches the target-side logic. This extension point lets you add data conversions, derived columns, lookups, conditional splits, or any other SSIS dataflow component into the pipeline after the source data has been read and initial transformations have been applied. Use it to reshape or enrich the data in-flight before it is written to the Hub, Link, or Satellite.
Where It Fires
BimlFlex places the custom component in the SSIS data flow after its standard source-side transformations (row count, data conversion) and, for a Satellite, Link Satellite or Reference object, before the full row hash. SSIS only. It does not apply to ELT or stored procedure patterns. BimlFlex writes the row count only when the Use Custom Components setting is on, and its data conversion only when a column needs one.
When to Use It
- Add a Data Conversion component to change the data type of a column coming from the
AWLT_SRCsource before it reaches the Hub insert -- use this instead ofDvSourceOverridewhen you want to keep the default source and just add a transformation. - Add a Derived Column transformation to compute a composite business key or apply a string normalization function before loading
dv.HUB_Customer. - Add a Lookup transformation against a reference table to enrich Satellite attributes before they are inserted into
dv.SAT_Customer_Details_awlt. - Insert a Conditional Split to route error rows to a separate output path for logging while allowing valid rows to continue to the Data Vault target.
- Add a Row Count transformation for custom audit logging -- use this instead of
DvSourcePipelinePrewhen you need the count after source-side transformations have been applied.
Prerequisites
- SSIS (ETL) architecture must be in use. This extension point does not apply to ELT patterns.
- The
inputPathparameter provides the output path name from the preceding component; you must reference it in your component's<InputPath>element. CustomOutput.OutputPathNamemust be set so downstream components can connect.- The transformation component must produce column names and types compatible with what downstream components expect.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvSourcePipelinePostand thetargetattribute to your Data Vault object. - Define the SSIS dataflow component in Biml XML, referencing
inputPathfor the input and settingCustomOutput.OutputPathNamefor the output. - Build and verify the generated SSIS package in Visual Studio.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvSourcePipelinePost" target="HUB_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<# CustomOutput.ObjectInherit = false; #>
<DerivedColumns Name="DER - Normalize CustomerName">
<InputPath OutputPathName="<#=inputPath #>" />
<Columns>
<Column Name="Customer_BK" DataType="String" Length="50" ReplaceExisting="true">UPPER(TRIM(Customer_BK))</Column>
</Columns>
<# CustomOutput.OutputPathName = @"DER - Normalize CustomerName.Output"; #>
</DerivedColumns>
Example
Before (default SSIS dataflow source-side chain):
<!-- BimlFlex source transformations -->
<!-- Data flows from the BimlFlex data conversion DCV - Customer, when one is written, to the target-side transformations -->
After (with DvSourcePipelinePost applied):
<!-- BimlFlex source transformations -->
<DerivedColumns Name="DER - Normalize CustomerName">
<InputPath OutputPathName="DCV - Customer.Output" />
<Columns>
<Column Name="Customer_BK" DataType="String" Length="50" ReplaceExisting="true">UPPER(TRIM(Customer_BK))</Column>
</Columns>
</DerivedColumns>
<!-- Data flows to target-side transformations from DER output -->
Common Mistakes
- Forgetting to set
CustomOutput.OutputPathName-- Symptom: downstream transformations have no input connection; SSIS package fails validation. Fix: always setCustomOutput.OutputPathNameto"<ComponentName>.Output". - Hardcoding the input path instead of using
<#=inputPath #>-- Symptom: the component connects to the wrong upstream output or fails if BimlFlex changes the preceding component. Fix: always use theinputPathparameter. - Renaming or removing columns that downstream components depend on -- Symptom: SSIS validation error about missing columns. Fix: use
ReplaceExisting="true"for in-place modifications, or add new columns rather than removing existing ones. - Using this extension point with ELT architecture -- Symptom: the extension point is ignored. Fix: for ELT, use
DvPostSourceSqlto add SQL after the staging query (on Databricks and a Fabric lakehouse only for a Staged Object source).
Related Extension Points
- DvSourcePipelinePre runs after the source component and before BimlFlex's data conversion. Use it when you need to transform data before BimlFlex converts it.
- DvTargetPipelinePre / DvTargetPipelinePost -- for adding transformations on the target side of the dataflow.
- DvSourceOverride -- for replacing the entire source component rather than adding transformations after it.
Data Vault Source Pipeline Pre
Configure pipeline logic that will be injected after the Data Vault source transformation node
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| inputPath | String | Contains the output path of the preceding task |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
| OutputPathName | String | You must add CustomOutput.OutputPathName with the last task to connect it with the next Data Flow task. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvSourcePipelinePre" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<!-- This can be any anything defined within the SSIS Data Flow. -->
<DataConversion Name="DCV - Convert MyColumn">
<InputPath OutputPathName="<#=inputPath #>" />
<Columns>
<Column SourceColumn="MyColumn" TargetColumn="cnv_MyColumn" DataType="String" Length="100" />
</Columns>
<# CustomOutput.OutputPathName = @"DCV - Convert MyColumn.Output"; #>
</DataConversion>
What It Does
Injects custom SSIS dataflow transformation components after the Data Vault source component and the BimlFlex row count (when the Use Custom Components setting is on), but before BimlFlex's data conversion and the other standard source-side transformations that follow it. This extension point lets you add transformations that act on the raw source data before BimlFlex converts it. Use it for early-stage filtering, type casting, or data cleansing that must happen before the data conversion.
Where It Fires
BimlFlex places the custom component in the SSIS data flow after the source component and, when the Use Custom Components setting is on, after the BimlFlex row count, and before BimlFlex's data conversion. SSIS only. It does not apply to ELT or stored procedure patterns.
When to Use It
- Add an early Data Conversion to cast columns from the
AWLT_SRCsource to the expected types before BimlFlex's own data conversion runs. Use this instead ofDvSourcePipelinePostwhen the type change must happen before BimlFlex's data conversion. - Insert a Conditional Split early in the data flow to discard invalid rows before they reach BimlFlex's data conversion.
- Add a Derived Column to create a surrogate or composite column that BimlFlex's standard transformations will reference downstream.
- Insert a data sampling or auditing component for debugging purposes early in the pipeline.
Prerequisites
- SSIS (ETL) architecture must be in use. This extension point does not apply to ELT patterns.
- The
inputPathparameter provides the output path name of the component before it, such as the BimlFlex row count when the Use Custom Components setting is on. Reference it in your<InputPath>element. CustomOutput.OutputPathNamemust be set so the standard BimlFlex transformations can connect downstream.- The transformation must preserve all columns expected by subsequent BimlFlex-generated components.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvSourcePipelinePreand thetargetattribute to the source object of the Data Vault load (or to the batch). - Define the SSIS dataflow component in Biml XML, referencing
inputPathand settingCustomOutput.OutputPathName. - Build and verify the generated SSIS package in Visual Studio.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvSourcePipelinePre" target="AWLT_SRC.SalesLT.Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<# CustomOutput.ObjectInherit = false; #>
<DataConversion Name="DCV - Cast EmailAddress">
<InputPath OutputPathName="<#=inputPath #>" />
<Columns>
<Column SourceColumn="EmailAddress" TargetColumn="cnv_EmailAddress" DataType="String" Length="320" />
</Columns>
<# CustomOutput.OutputPathName = @"DCV - Cast EmailAddress.Output"; #>
</DataConversion>
Example
Before (default SSIS dataflow beginning):
<OleDbSource Name="OLE_SRC - Customer" ConnectionName="BFX_STG" CommandTimeout="0">
<DirectInput>SELECT * FROM [awlt].[SalesLT_Customer]</DirectInput>
</OleDbSource>
<!-- BimlFlex standard source transformations (row count, etc.) follow -->
After (with DvSourcePipelinePre applied):
<OleDbSource Name="OLE_SRC - Customer" ConnectionName="BFX_STG" CommandTimeout="0">
<DirectInput>SELECT * FROM [awlt].[SalesLT_Customer]</DirectInput>
</OleDbSource>
<!-- BimlFlex row count FLX - Select BFX_DV_dv_SAT_Customer_Details_awlt follows the source when the Use Custom Components setting is on -->
<DataConversion Name="DCV - Cast EmailAddress">
<InputPath OutputPathName="FLX - Select BFX_DV_dv_SAT_Customer_Details_awlt.Output" />
<Columns>
<Column SourceColumn="EmailAddress" TargetColumn="cnv_EmailAddress" DataType="String" Length="320" />
</Columns>
</DataConversion>
<!-- BimlFlex data conversion and the other standard source transformations follow from DCV output -->
Common Mistakes
- Removing or renaming columns that BimlFlex's standard transformations expect -- Symptom: SSIS validation errors in downstream components. Fix: only add new columns or use
ReplaceExistingfor in-place type changes; never drop columns. - Hardcoding the input path -- Symptom: breaks if BimlFlex changes the source component name. Fix: always use
<#=inputPath #>. - Confusing Pre with Post. Symptom: the transformation runs after BimlFlex's data conversion instead of before it. Fix: use
DvSourcePipelinePrefor transformations that must run before the data conversion andDvSourcePipelinePostfor logic that must run after it. - Using this with ELT patterns -- Symptom: extension point is ignored. Fix: for ELT, use
DvPreSourceSqlto add SQL before the staging query (on Databricks and a Fabric lakehouse only for a Staged Object source).
Related Extension Points
- DvSourcePipelinePost runs after BimlFlex's data conversion and, for a Satellite, Link Satellite or Reference object, before the full row hash. Use it when you need to transform data after BimlFlex converts it.
- DvSourceOverride -- for replacing the entire source component rather than adding transformations after it.
- DvTargetPipelinePre -- the target-side equivalent for adding transformations before target-side processing.
Data Vault Target Override
Configure override for the Data Vault target transformation node
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| inputPath | String | Contains the output path of the preceding task |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvTargetOverride" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<!-- NOTE: The type of target override must be consistent to the connection type. -->
<# var targetConnection = targetTable.GetTargetConnection();
var targetScopedName = new ObjectViewModel(targetTable, this).GetTargetScopedName(targetConnection);
var targetSsisSafeScopedName = targetScopedName.MakeSsisSafe();
#>
<# CustomOutput.ObjectInherit = false; #>
<OleDbDestination Name="OLE_DST - <#=targetSsisSafeScopedName#>" ConnectionName="<#=targetConnection.Name#>" MaximumInsertCommitSize="500000" BatchSize="500000" CheckConstraints="false">
<InputPath OutputPathName="<#=inputPath#>" />
<ExternalTableOutput Table="[dbo].[HUB_MyTable]" />
</OleDbDestination>
What It Does
Completely replaces the default SSIS dataflow destination component for a Data Vault load package. Instead of using the BimlFlex-generated OLE DB Destination that writes to the Hub, Link, or Satellite table, you provide your own destination component with custom connection settings, table mappings, or an entirely different destination type. This is an ETL-only (SSIS) extension point that gives you full control over how and where the Data Vault dataflow writes its output.
Where It Fires
BimlFlex checks this override after DwhTargetOverride, which it also reads for a Data Vault target and which takes precedence. The fallback order is: DwhTargetOverride > DvTargetOverride > default destination. When defined, the custom destination replaces the entire default target node in the dataflow. SSIS only. It does not apply to ELT or stored procedure patterns.
When to Use It
- Redirect the Data Vault output to a different table or schema than what BimlFlex metadata specifies -- for example, writing
dv.HUB_Customerto a partitioned staging table with a subsequent swap operation. - Change the destination component type -- for example, use an ADO.NET Destination instead of OLE DB for a specific connectivity requirement to the
BFX_DVtarget. - Adjust batch size, commit size, or constraint-checking settings on the destination for performance tuning during initial loads.
- Write to a flat file or other non-relational destination for a one-time export of Data Vault data through the standard pipeline.
- Add a custom OLE DB Command destination for UPSERT logic -- use this instead of the default INSERT when the target does not support the standard BimlFlex merge pattern.
Prerequisites
- SSIS (ETL) architecture must be in use. This extension point does not apply to ELT patterns.
- The
inputPathparameter provides the output path name from the preceding transformation; reference it in your component's<InputPath>element. - The connection referenced in the destination must be defined in BimlFlex metadata.
- The destination component type must be consistent with the connection type.
- Be aware that
DwhTargetOverridetakes precedence if both are defined for the same object.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvTargetOverrideand thetargetattribute to your Data Vault object. - Define the replacement destination component in Biml XML, referencing
inputPathfor the input. - Build and verify the generated SSIS package in Visual Studio to confirm the destination component is wired correctly.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvTargetOverride" target="HUB_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<# var targetConnection = targetTable.GetTargetConnection();
var targetScopedName = new ObjectViewModel(targetTable, this).GetTargetScopedName(targetConnection);
var targetSsisSafeScopedName = targetScopedName.MakeSsisSafe();
#>
<# CustomOutput.ObjectInherit = false; #>
<OleDbDestination Name="OLE_DST - <#=targetSsisSafeScopedName#>" ConnectionName="<#=targetConnection.Name#>" MaximumInsertCommitSize="200000" BatchSize="200000" CheckConstraints="false">
<InputPath OutputPathName="<#=inputPath#>" />
<ExternalTableOutput Table="[dv].[HUB_Customer]" />
</OleDbDestination>
Example
Before (default generated SSIS destination component):
<OleDbDestination Name="OLE_DST - BFX_DV BFX_DV_dv_HUB_Customer" ConnectionName="BFX_DV" MaximumInsertCommitSize="2147483647" BatchSize="500000" CheckConstraints="false">
<InputPath OutputPathName="FLX - Insert BFX_DV_dv_HUB_Customer.Output" />
<ExternalTableOutput Table="[dv].[HUB_Customer]" />
</OleDbDestination>
After (with DvTargetOverride applied -- reduced batch sizes):
<OleDbDestination Name="OLE_DST - BFX_DV_dv_HUB_Customer" ConnectionName="BFX_DV" MaximumInsertCommitSize="200000" BatchSize="200000" CheckConstraints="false">
<InputPath OutputPathName="FLX - Insert BFX_DV_dv_HUB_Customer.Output" />
<ExternalTableOutput Table="[dv].[HUB_Customer]" />
</OleDbDestination>
Common Mistakes
- Having both DwhTargetOverride and DvTargetOverride defined for the same object -- Symptom:
DvTargetOverrideis silently ignored becauseDwhTargetOverridetakes precedence. Fix: use only one target override per object; remove theDwhTargetOverrideif you intend the DV-specific override to apply. - Forgetting to reference
inputPathin the<InputPath>element -- Symptom: SSIS validation fails because the destination has no input connection. Fix: always use<InputPath OutputPathName="<#=inputPath#>" />. - Mismatching the table schema in
<ExternalTableOutput>-- Symptom: column mapping errors in the SSIS package. Fix: ensure theTableattribute references the correct schema and table name with proper bracket escaping. - Using this with ELT architecture -- Symptom: the extension point is ignored and the generated load is unchanged. Fix: for ELT, use
DvPreTargetSql/DvPostTargetSqlto add SQL before or after the load of the object.
Related Extension Points
- DvTargetPipelinePre / DvTargetPipelinePost -- use these to add transformations before the destination rather than replacing it entirely.
- DvSourceOverride -- the source-side equivalent; replaces the source component in the SSIS dataflow.
- DvPreTargetSql / DvPostTargetSql -- ELT counterparts that add SQL before and after the load of the object, without replacing it.
Data Vault Target Pipeline Post
Configure pipeline logic that will be injected before the target transformation node
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| inputPath | String | Contains the output path of the preceding task |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
| OutputPathName | String | You must add CustomOutput.OutputPathName with the last task to connect it with the next Data Flow task. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvTargetPipelinePost" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<!-- This can be any anything defined within the SSIS Data Flow. -->
<# CustomOutput.ObjectInherit = false; #>
<DataConversion Name="DCV - Convert MyColumn">
<InputPath OutputPathName="<#=inputPath #>" />
<Columns>
<Column SourceColumn="MyColumn" TargetColumn="cnv_MyColumn" DataType="String" Length="100" />
</Columns>
<# CustomOutput.OutputPathName = @"DCV - Convert MyColumn.Output"; #>
</DataConversion>
What It Does
Injects custom SSIS dataflow transformation components after the Data Vault target-side transformations but before the destination component. This extension point lets you add final data conversions, derived columns, row counts, lookups, or other SSIS transformations that act on the data immediately before it is written to the Hub, Link, or Satellite. Use it for last-mile data shaping that must happen after all standard target-side processing.
Where It Fires
Consumed in 90.flx-i-get-target-transformation.biml (line ~12). Conditional logic applies: if the integrationStage is "DWH", the Dwh variant is used; otherwise the Dv variant fires. This ensures the correct extension point activates based on the object's integration stage. SSIS-only -- does not apply to ELT/stored procedure patterns.
When to Use It
- Add a final Data Conversion to ensure column types exactly match the Hub or Satellite table schema before the destination insert -- use this instead of
DvTargetPipelinePrewhen you need the conversion applied after all standard target-side transformations. - Insert a Row Count transformation immediately before the destination for custom audit logging of the exact number of rows reaching
dv.SAT_Customer_Details_awlt. - Add a Multicast to split the data stream and send a copy to a secondary destination (e.g., an audit table) while the primary stream goes to the Data Vault target.
- Insert a Derived Column transformation to add a load timestamp or batch identifier column just before the data reaches
dv.HUB_Customer.
Prerequisites
- SSIS (ETL) architecture must be in use. This extension point does not apply to ELT patterns.
- The
inputPathparameter provides the output path from the preceding target-side transformation; reference it in your<InputPath>element. CustomOutput.OutputPathNamemust be set so the destination component can connect.- The Dv variant fires for a target whose connection has the Integration Stage Data Vault (
DV), Business Data Vault (BDV), Data Mart (DM) or Master Data Services (MDS). For a Data Warehouse (DWH) target, BimlFlex readsDwhTargetPipelinePostinstead.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvTargetPipelinePostand thetargetattribute to your Data Vault object. - Define the SSIS dataflow component in Biml XML, referencing
inputPathand settingCustomOutput.OutputPathName. - Build and verify the generated SSIS package in Visual Studio.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvTargetPipelinePost" target="SAT_Customer_Details_awlt" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<# CustomOutput.ObjectInherit = false; #>
<RowCount Name="RC_AUDIT - SAT_Customer_Details" VariableName="User.AuditInsertCount">
<InputPath OutputPathName="<#=inputPath #>" />
<# CustomOutput.OutputPathName = @"RC_AUDIT - SAT_Customer_Details.Output"; #>
</RowCount>
Example
Before (default SSIS dataflow target-side chain before destination):
<!-- BimlFlex target-side transformations complete -->
<!-- Destination component follows, after the BimlFlex row count FLX - Insert BFX_DV_dv_SAT_Customer_Details_awlt when the Use Custom Components setting is on -->
After (with DvTargetPipelinePost applied):
<!-- BimlFlex target-side transformations complete -->
<RowCount Name="RC_AUDIT - SAT_Customer_Details" VariableName="User.AuditInsertCount">
<InputPath OutputPathName="FLX - Insert BFX_DV_dv_SAT_Customer_Details_awlt.Output" />
</RowCount>
<!-- Destination component connects to RC_AUDIT output -->
Common Mistakes
- Forgetting to set
CustomOutput.OutputPathName-- Symptom: the destination component has no input; SSIS package fails validation. Fix: always setCustomOutput.OutputPathNameto your component's output path. - Hardcoding the input path instead of using
<#=inputPath #>-- Symptom: breaks if BimlFlex changes the preceding component name. Fix: always use theinputPathparameter. - Adding transformations that filter or remove rows without accounting for downstream expectations -- Symptom: fewer rows arrive at the destination than expected; audit counts mismatch. Fix: if you need to filter, use a Conditional Split and direct both outputs appropriately.
- Confusing DvTargetPipelinePost with DvTargetPipelinePre -- Symptom: transformation runs before target-side processing instead of after. Fix: use
DvTargetPipelinePostfor post-target-transformation logic.
Related Extension Points
- DvTargetPipelinePre -- runs before the target-side transformations; use for early target-side data shaping.
- DvTargetOverride -- for replacing the entire destination component rather than adding transformations before it.
- DvSourcePipelinePost -- the source-side equivalent for adding post-source transformations.
- DvPostTargetSql -- ELT counterpart for adding logic after the load of the object.
Data Vault Target Pipeline Pre
Configure pipeline logic that will be injected before the target transformations
Parameters
Name | Type | Description |
|---|---|---|
| sourceTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| targetTable | BimlFlexModelWrapper.ObjectsWrapper | Contains all information related to the object to which the pipeline will be added |
| inputPath | String | Contains the output path of the preceding task |
Outputs
Name | Type | Description |
|---|---|---|
| ObjectInherit | Boolean | If CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch. |
| OutputPathName | String | You must add CustomOutput.OutputPathName with the last task to connect it with the next Data Flow task. |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvTargetPipelinePre" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<!-- This can be any anything defined within the SSIS Data Flow. -->
<# CustomOutput.ObjectInherit = false; #>
<DataConversion Name="DCV - Convert MyColumn">
<InputPath OutputPathName="<#=inputPath #>" />
<Columns>
<Column SourceColumn="MyColumn" TargetColumn="cnv_MyColumn" DataType="String" Length="100" />
</Columns>
<# CustomOutput.OutputPathName = @"DCV - Convert MyColumn.Output"; #>
</DataConversion>
What It Does
Injects custom SSIS dataflow transformation components before the Data Vault target-side transformations begin. This extension point lets you add transformations that act on the data after source-side processing is complete but before BimlFlex applies its own target-side logic (such as lookups, hash comparisons, and row filtering for Hub/Link/Satellite inserts). Use it for early target-side data preparation, additional lookups, or filtering.
Where It Fires
Conditional logic applies: for a target whose connection has the Integration Stage Data Warehouse (DWH), BimlFlex uses the Dwh variant, DwhTargetPipelinePre, and for a Data Vault (DV), Business Data Vault (BDV), Data Mart (DM) or Master Data Services (MDS) target the Dv variant fires. This ensures the correct extension point activates based on the object's integration stage. SSIS only. It does not apply to ELT or stored procedure patterns.
When to Use It
- Add a Lookup transformation against a reference table to enrich rows with classification codes before BimlFlex's target-side Hub/Link key lookups execute -- use this instead of
DvSourcePipelinePostwhen the enrichment must happen on the target side of the dataflow. - Insert a Conditional Split to filter out rows that should not participate in target-side processing -- for example, excluding test records before loading
dv.LNK_SalesOrder. - Add a Derived Column transformation to compute a value that the target-side lookup or hash comparison will reference.
- Insert an Aggregate transformation to deduplicate rows before they enter the target-side processing for
dv.HUB_Customer, preventing duplicate business key inserts. - Add a Data Conversion component to change column types to match what target-side lookups expect -- use this instead of
DvTargetPipelinePostwhen the type change must happen before the lookup.
Prerequisites
- SSIS (ETL) architecture must be in use. This extension point does not apply to ELT patterns.
- The
inputPathparameter provides the output path from the source-side chain; reference it in your<InputPath>element. CustomOutput.OutputPathNamemust be set so BimlFlex's target-side transformations can connect.- The Dv variant fires for a target whose connection has the Integration Stage Data Vault (
DV), Business Data Vault (BDV), Data Mart (DM) or Master Data Services (MDS). For a Data Warehouse (DWH) target, BimlFlex readsDwhTargetPipelinePreinstead.
Implementation Steps
- Create a new extension point file in the BimlFlex Extension Points editor.
- Set the
extensionpointdirective toDvTargetPipelinePreand thetargetattribute to your Data Vault object. - Define the SSIS dataflow component in Biml XML, referencing
inputPathand settingCustomOutput.OutputPathName. - Build and verify the generated SSIS package in Visual Studio.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="DvTargetPipelinePre" target="HUB_Customer" #>
<#@ property name="sourceTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="targetTable" type="BimlFlexModelWrapper.ObjectsWrapper" #>
<#@ property name="inputPath" type="String" #>
<# CustomOutput.ObjectInherit = false; #>
<Aggregate Name="AGG - Deduplicate Customer BK">
<InputPath OutputPathName="<#=inputPath #>" />
<Columns>
<Column SourceColumn="Customer_BK" Operation="GroupBy" />
<Column SourceColumn="FlexRowEffectiveFromDate" Operation="Maximum" />
</Columns>
<# CustomOutput.OutputPathName = @"AGG - Deduplicate Customer BK.Output"; #>
</Aggregate>
Example
Before (default SSIS dataflow transition from source-side to target-side):
<!-- Source-side transformations complete -->
<!-- BimlFlex target-side transformations (lookups, hash checks) begin -->
<DerivedColumns Name="DC - Add Audit Columns" ...>
<InputPath OutputPathName="DCV - Customer.Output" />
After (with DvTargetPipelinePre applied):
<!-- Source-side transformations complete -->
<Aggregate Name="AGG - Deduplicate Customer BK">
<InputPath OutputPathName="DCV - Customer.Output" />
<Columns>
<Column SourceColumn="Customer_BK" Operation="GroupBy" />
<Column SourceColumn="FlexRowEffectiveFromDate" Operation="Maximum" />
</Columns>
</Aggregate>
<!-- BimlFlex target-side transformations connect to AGG output -->
<DerivedColumns Name="DC - Add Audit Columns" ...>
<InputPath OutputPathName="AGG - Deduplicate Customer BK.Output" />
Common Mistakes
- Forgetting to set
CustomOutput.OutputPathName-- Symptom: target-side transformations have no input; SSIS package fails validation. Fix: always setCustomOutput.OutputPathNameto your component's output path. - Hardcoding the input path instead of using
<#=inputPath #>-- Symptom: breaks if BimlFlex changes the preceding source-side component. Fix: always use theinputPathparameter. - Removing columns that BimlFlex's target-side lookups depend on -- Symptom: SSIS validation error about missing columns in the Lookup component. Fix: preserve all columns expected by downstream components; only add new columns or aggregate existing ones without dropping them.
- Using this with an object that has integration stage DWH. Symptom: the Dv variant does not fire, and the Dwh variant fires instead. Fix: verify the object's integration stage is Data Vault, Business Data Vault, Data Mart or Master Data Services, or use
DwhTargetPipelinePrefor Data Warehouse objects. - Confusing Pre with Post -- Symptom: transformation runs after target-side processing instead of before. Fix: use
DvTargetPipelinePrefor pre-target-transformation logic andDvTargetPipelinePostfor post-target-transformation logic.
Related Extension Points
- DvTargetPipelinePost -- runs after the target-side transformations; use for final data shaping before the destination.
- DvTargetOverride -- for replacing the entire destination component rather than adding transformations before it.
- DvSourcePipelinePre / DvSourcePipelinePost -- the source-side equivalents for adding transformations in the source portion of the dataflow.
- DvPreTargetSql -- ELT counterpart for adding logic before the load of the object.