Skip to main content

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
TypeDescription
tableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the SQL will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch.
DvBridgeLagSqlStringText 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.
DvBridgeAddParameterStringParameter declarations added to the bridge load procedure, which declares no parameters of its own.
DvBridgeDateWhereSqlStringA condition appended to the WHERE of the date statement of the bridge load, which finds the latest loaded bridge date. Start with AND.
DvBridgeDateOverrideWhereSqlStringReplaces the WHERE of the date statement of the bridge load. Write the whole clause, starting with WHERE.
DvBridgeWhereSqlStringA condition appended to the WHERE of the bridge merge source after the generated effective date condition. Start with AND. The hub alias is hub.
DvBridgeOverrideWhereSqlStringReplaces the WHERE of the bridge merge source. Write the whole clause, starting with WHERE. When both override outputs are set, this one is used.
DvBridgeHubWhereSqlStringA 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.
DvBridgeHubOverrideWhereSqlStringReplaces the WHERE of the bridge merge source with a clause on the hub. Write the whole clause, starting with WHERE.
DvBridgeColumnSelectStringColumns appended to the select list of the bridge merge source after the effective date column. Start with a comma.
DvBridgeColumnInsertStringColumns 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.
DvBridgeColumnElementsStringColumn definitions added to the Biml definition of the bridge table after the generated columns, written as Biml Column elements.
DvBridgeOverrideSqlStringReplaces 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​

  1. Add a tenant or security filter to Bridge queries by setting DvBridgeWhereSql to append a WHERE clause condition -- for example, filtering dv.BRG_SalesOrder to only include active orders from the AWLT_SRC source system.
  2. Include additional columns from Satellites in the Bridge output by setting DvBridgeColumnSelect and DvBridgeColumnInsert -- use this instead of manually creating a view on top of the Bridge table.
  3. Override the date-range filtering logic with DvBridgeDateWhereSql when the default temporal join behavior does not match your business rules.
  4. 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.
  5. Customize Hub join conditions with DvBridgeHubWhereSql when you need to exclude ghost records or filter by record source during the Bridge build for LOAD_BFX_DV batch 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_DV connection (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​

  1. In BimlFlex, open the Extension Points editor and create a new extension point file.
  2. Set the extensionpoint directive to DvBridgeSql and the target attribute to your Bridge object.
  3. Uncomment and populate only the CustomOutput properties you need.
  4. 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​

  1. Setting DvBridgeOverrideSql while 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, DvBridgeColumnInsert and DvBridgeAddParameter outputs of the file do not apply, and neither does a DvBridgePreProcessSql or DvBridgePostProcessSql extension point. In the Databricks and Fabric lakehouse notebooks the override replaces the merge statement alone, so DvBridgeWhereSql, DvBridgeOverrideWhereSql, DvBridgeHubWhereSql, DvBridgeHubOverrideWhereSql, DvBridgeColumnSelect and DvBridgeColumnInsert do not apply, while the lag and date outputs still do. DvBridgeColumnElements still adds its columns to the Biml definition of the Bridge table. Fix: use either DvBridgeOverrideSql or the granular outputs, not both.
  2. Forgetting to include AND at the start of DvBridgeWhereSql -- Symptom: a SQL syntax error. Fix: start DvBridgeWhereSql, DvBridgeHubWhereSql and DvBridgeDateWhereSql with AND, since BimlFlex appends each after the generated conditions of the WHERE it extends. Start DvBridgeOverrideWhereSql, DvBridgeHubOverrideWhereSql and DvBridgeDateOverrideWhereSql with WHERE, since each replaces a whole WHERE.
  3. Adding columns in DvBridgeColumnSelect without matching DvBridgeColumnInsert -- Symptom: the merge does not write the columns that DvBridgeColumnSelect adds, and a column that DvBridgeColumnInsert names without a matching column in DvBridgeColumnSelect causes an error, because the VALUES list of the merge reads that name from the merge source with the INS alias. Fix: always set both properties together with matching column lists.
  4. Setting ObjectInherit = true without realizing it applies to all Bridge objects in the batch -- Symptom: unintended filters applied to every Bridge in the LOAD_BFX_DV batch. Fix: use ObjectInherit = false and target individual Bridge objects with the target attribute.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. Log the row count loaded into dv.BRG_SalesOrder to an audit table after each Bridge refresh -- use this instead of adding a separate post-deploy script that runs outside the Bridge load.
  2. Rebuild or update statistics on the Bridge table after the load completes to ensure downstream queries have optimal execution plans.
  3. 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.
  4. Send a notification or update a control table to signal that the Bridge refresh for the LOAD_BFX_DV batch is complete.

Prerequisites​

  • Target object must be a Bridge (BRG) type in BimlFlex metadata.
  • The BFX_DV connection 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​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvBridgePostProcessSql and the target attribute to your Bridge object.
  3. Write the SQL fragment that should execute after the Bridge load.
  4. 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​

  1. Referencing @@ROWCOUNT after additional statements -- Symptom: audit log always shows 0 or incorrect counts. Fix: capture @@ROWCOUNT in the very first statement of your post-process SQL since any intervening statement resets it.
  2. 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.
  3. 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.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. 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_SalesOrder fully refreshed.
  2. Create a temporary table or table variable to stage intermediate results that the Bridge query will reference.
  3. Set session-level options such as SET NOCOUNT ON or SET ANSI_WARNINGS OFF that affect the Bridge query behavior.
  4. Log the start time of the Bridge load to an audit table for the LOAD_BFX_DV batch monitoring.

Prerequisites​

  • Target object must be a Bridge (BRG) type in BimlFlex metadata.
  • The BFX_DV connection must be configured.
  • The SQL fragment must be valid for the target platform.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvBridgePreProcessSql and the target attribute to your Bridge object.
  3. Write the SQL fragment that should execute before the Bridge load.
  4. 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​

  1. 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.
  2. 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.
  3. 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.
  • 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
TypeDescription
tableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the SQL will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch.
DvPitAddParameterStringThe parameter declarations of the point in time procedure. The generated procedure declares no parameters, so this text is its whole parameter list.
DvPitLagSqlStringText 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.
DvPitDateWhereSqlStringText appended after the generated WHERE of the lookup that finds the latest loaded point in time date, written to start with AND.
DvPitDateOverrideWhereSqlStringThe 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.
DvPitHubWhereSqlStringThe 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.
DvPitHubOverrideWhereSqlStringThe 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.
DvPitSatWhereSqlStringThe 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.
DvPitSatOverrideWhereSqlStringThe 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.
DvPitDeleteWhereSqlStringNot used. BimlFlex does not read this output, so setting it changes nothing in the generated code.
DvPitDeleteOverrideWhereSqlStringNot used. BimlFlex does not read this output, so setting it changes nothing in the generated code.
DvPitSourceAddSelectStringColumns appended to the select list of the point in time delta statement after the generated columns, each written with a leading comma.
DvPitTargetAddInsertStringNot used. BimlFlex does not read this output, so setting it changes nothing in the generated code.
DvPitTargetAddSelectStringNot used. BimlFlex does not read this output, so setting it changes nothing in the generated code.
DvPitColumnElementsStringBiml Column elements added to the Biml definition of the point in time table after the generated columns.
DvPitOverrideSqlStringThe 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​

  1. Add a parameter to the PIT procedure with DvPitAddParameter and use it in DvPitHubWhereSql and DvPitSatWhereSql -- for example, a @TenantCode parameter that limits dv.PIT_Customer to 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 example WHERE (@TenantCode IS NULL OR hub.[TenantCode] = @TenantCode), or call the procedure yourself with a value. On Snowflake BimlFlex writes DvPitAddParameter into the parameter list of the procedure as well, and the call it generates there also passes no arguments.
  2. Change the default lag period with DvPitLagSql to 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.
  3. Filter the Satellite rows with DvPitSatWhereSql -- for example, only rows whose FlexRowRecordSource is AWLT. The filter applies to every Satellite of the PIT.
  4. Add a column definition to the PIT table with DvPitColumnElements where the PIT load is a stored procedure. On Databricks and a Fabric lakehouse it adds no column to the table. DvPitSourceAddSelect adds 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 read DvPitTargetAddInsert and DvPitTargetAddSelect. To load an added column, replace the load with DvPitOverrideSql.
  5. Completely replace the generated PIT procedure with DvPitOverrideSql when 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 lakehouse DvPitOverrideSql has 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_DV connection (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 valid DataType, Length, and IsNullable attributes.
  • Familiarity with the generated PIT stored procedure or notebook structure is recommended -- build once without extension points and review the output.

Implementation Steps​

  1. In BimlFlex, open the Extension Points editor and create a new extension point file.
  2. Set the extensionpoint directive to DvPitSql and the target attribute to your PIT object.
  3. Uncomment and populate only the CustomOutput properties you need.
  4. If adding a column, define it with DvPitColumnElements. Leave out DvPitTargetAddInsert and DvPitTargetAddSelect, which have no effect.
  5. 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​

  1. Setting DvPitOverrideSql while also setting individual fragment outputs -- Symptom: the outputs that shape the procedure are ignored, because DvPitOverrideSql replaces the whole generated procedure script, including the statement that creates the procedure, while DvPitColumnElements still adds its column to the table. On Databricks and a Fabric lakehouse DvPitOverrideSql has no effect and DvPitColumnElements adds no column to the table. Fix: use either DvPitOverrideSql or the granular outputs, not both.
  2. Expecting DvPitTargetAddInsert or DvPitTargetAddSelect to load an added column -- Symptom: the column that DvPitColumnElements adds to the PIT table is not loaded: it stays NULL, or holds its default if the column element sets one, and a column with IsNullable="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 with DvPitOverrideSql.
  3. 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" />.
  4. Starting DvPitHubWhereSql or DvPitSatWhereSql with AND -- 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 with WHERE. It takes the place of the WHERE keyword, and BimlFlex adds its own conditions after it with AND.
  5. Setting DvPitDeleteWhereSql or DvPitDeleteOverrideWhereSql -- Symptom: nothing changes in the generated code. Fix: BimlFlex does not read these two outputs; remove them.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. Log the row count and load completion timestamp for dv.PIT_Customer to an audit table -- use this instead of a separate orchestration step so the logging stays within the PIT load.
  2. Rebuild clustered columnstore indexes on the PIT table after a full refresh to optimize query performance for downstream reporting.
  3. Run a validation query that checks the PIT table for duplicate surrogate key entries and logs any anomalies.
  4. Update a watermark or control table to record the latest successful PIT refresh for the LOAD_BFX_DV batch.

Prerequisites​

  • Target object must be a PIT type in BimlFlex metadata.
  • The BFX_DV connection 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​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPitPostProcessSql and the target attribute to your PIT object.
  3. Write the SQL fragment that should execute after the PIT load.
  4. 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​

  1. Reading @@ROWCOUNT to 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 @@ROWCOUNT is 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.
  2. Running ALTER INDEX REBUILD on a large PIT table without sufficient maintenance window -- Symptom: long-running blocking operation. Fix: use ALTER INDEX REORGANIZE for online maintenance or schedule full rebuilds during off-hours.
  3. 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.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. Truncate dv.PIT_Customer before a full rebuild -- use this instead of a separate orchestration step when the PIT table should always be fully refreshed.
  2. Create a temporary table to capture the current PIT row count for comparison in DvPitPostProcessSql.
  3. Set session-level options that affect query behavior, such as SET LOCK_TIMEOUT for large PIT loads against BFX_DV.
  4. Log the PIT load start time to an audit table for monitoring the LOAD_BFX_DV batch execution.

Prerequisites​

  • Target object must be a PIT type in BimlFlex metadata.
  • The BFX_DV connection must be configured.
  • The SQL fragment must be valid for the target platform.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPitPreProcessSql and the target attribute to your PIT object.
  3. Write the SQL fragment that should execute before the PIT load.
  4. 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​

  1. 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.
  2. 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.
  3. Adding logic that should run after the load -- Symptom: the SQL executes on stale PIT data. Fix: move post-load logic to DvPitPostProcessSql.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the target object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. 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.
  2. Execute post-load data quality checks against dv.HUB_Customer to verify no duplicate business keys were inserted during the load from BFX_STG.
  3. Update a control or watermark table to signal that the Data Vault load step in the LOAD_BFX_DV batch has completed successfully.
  4. Send a Service Broker message or insert into a queue table to trigger downstream processing of the loaded Data Vault objects.
  5. Rebuild indexes on Satellite tables after large delta loads -- use this instead of DvPitPostProcessSql or DvBridgePostProcessSql when 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_DV connection 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 DvPitPostProcessSql or DvBridgePostProcessSql for those.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPostProcessSql and the target attribute to your Data Vault object.
  3. Write the SQL that should execute after the Data Vault load completes.
  4. 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​

  1. Using this extension point for PIT or Bridge objects -- Symptom: the extension point is ignored; no SQL appears in the generated procedure. Fix: use DvPitPostProcessSql or DvBridgePostProcessSql for PIT and Bridge objects respectively.
  2. Reading @@ROWCOUNT to log the rows of a load -- Symptom: the audit log does not show the number of rows that the load wrote, even when @@ROWCOUNT is 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. @@ROWCOUNT holds 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 @@ROWCOUNT in DvPostTargetSql right after the load of a Hub or Link.
  3. Setting ObjectInherit = true without realizing it applies to all objects in the batch -- Symptom: the same post-process SQL runs for every Hub, Link, and Satellite in LOAD_BFX_DV. Fix: use ObjectInherit = false and target specific objects, or use BimlScript conditionals to filter by object type.
  4. Confusing DvPostProcessSql with DvPostTargetSql -- Symptom: SQL appears in the wrong location. Fix: DvPostProcessSql runs once, after all the loads of the source object, while DvPostTargetSql runs after the load of one Hub, Link, or Satellite.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the target object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. 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.
  2. 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.
  3. 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.
  4. Log the count of records retrieved from BFX_STG for the current load cycle of SalesLT.Customer data into the Data Vault.

Prerequisites​

  • Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
  • The BFX_DV connection and BFX_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​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPostSourceSql and the target attribute to your Data Vault object.
  3. Write the SQL fragment that should execute after the source query.
  4. 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​

  1. 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.
  2. Confusing DvPostSourceSql with DvPostProcessSql -- Symptom: SQL appears at the wrong location. Fix: DvPostSourceSql runs before the Hub, Link, and Satellite loads, and DvPostProcessSql runs after them.
  3. 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.
  4. 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).
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. Capture @@ROWCOUNT right after a Hub or Link MERGE to log how many new keys were written to dv.HUB_Customer -- use this instead of DvPostProcessSql when 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.
  2. Run a referential integrity check to verify that every row inserted into dv.LNK_SalesOrder has matching Hub keys in dv.HUB_Customer.
  3. Trigger a dependent operation such as updating a materialized view or refreshing a cache immediately after the Hub insert.
  4. Insert newly loaded business keys into a processing queue for downstream consumption by the LOAD_BFX_DV batch.

Prerequisites​

  • Target object must be a Hub, Link, Satellite, or Reference type in BimlFlex metadata.
  • The BFX_DV connection must be configured.
  • Familiarity with the distinction between DvPostTargetSql (after the load of one object) and DvPostProcessSql (after all the loads) is important.
  • Does not apply to PIT or Bridge objects.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPostTargetSql and the target attribute to your Data Vault object.
  3. Write the SQL fragment that should execute after the load of the object.
  4. 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​

  1. Confusing DvPostTargetSql with DvPostProcessSql -- Symptom: SQL appears after all the loads instead of after the load of one object. Fix: use DvPostTargetSql for logic that must run right after the load of a Hub, Link, or Satellite, and DvPostProcessSql for logic after all the loads.
  2. Not capturing @@ROWCOUNT as the first statement -- Symptom: @@ROWCOUNT returns the count from your first SQL statement, not the load. Fix: always declare a variable and capture @@ROWCOUNT in the very first line. For a Satellite with End Date Satellite on, the end-dating statements run before this fragment, so @@ROWCOUNT holds their count, not the INSERT count.
  3. 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 DvPostProcessSql or a separate step.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the target object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. Set session-level options such as SET NOCOUNT ON, SET XACT_ABORT ON, or SET LOCK_TIMEOUT that should apply to the entire Data Vault load procedure for dv.HUB_Customer or dv.SAT_Customer_Details_awlt.
  2. Declare and initialize variables that will be referenced by other extension points later in the procedure (e.g., a @LoadBatchId variable used by both DvPostSourceSql and DvPostProcessSql).
  3. 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.
  4. Log the start of the Data Vault load for the current object to an audit table within the LOAD_BFX_DV batch.
  5. 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.
  6. 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.
  7. 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_DV connection must be configured.
  • Does not apply to PIT or Bridge objects -- use DvPitPreProcessSql or DvBridgePreProcessSql for those.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPreProcessSql and the target attribute to your Data Vault object.
  3. Write the SQL that should execute at the start of the procedure.
  4. 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​

  1. Using this extension point for PIT or Bridge objects -- Symptom: the extension point is ignored. Fix: use DvPitPreProcessSql or DvBridgePreProcessSql for PIT and Bridge objects respectively.
  2. 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.
  3. Placing post-load logic in PreProcess -- Symptom: the logic runs on stale data from the previous load. Fix: move result-dependent logic to DvPostProcessSql or DvPostTargetSql.
  4. Setting ObjectInherit = true when only one object needs pre-processing -- Symptom: the pre-process SQL runs for every Hub, Link, and Satellite in the LOAD_BFX_DV batch. Fix: use ObjectInherit = false and set the target attribute to the specific object.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the target object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. Create an index on the staging table before the source query executes to improve join performance when loading dv.HUB_Customer from BFX_STG -- use this instead of permanently indexing staging tables when indexes are only needed during the DV load window.
  2. 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.Customer staging data before it reaches the Hub.
  3. Update statistics on the staging table to ensure the query optimizer makes good choices for the queries of the load against BFX_STG.
  4. 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_DV and BFX_STG connections must be configured.
  • Understanding of where this SQL lands relative to DvPreProcessSql is important: in a stored procedure DvPreSourceSql directly follows DvPreProcessSql, 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​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPreSourceSql and the target attribute to your Data Vault object.
  3. Write the SQL fragment that should execute before the source query.
  4. 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​

  1. Creating indexes that persist after the procedure and accumulate over time -- Symptom: staging table performance degrades due to excessive indexes. Fix: use DvPostSourceSql to drop the index after the source query completes.
  2. Confusing DvPreSourceSql with DvPreProcessSql -- Symptom: SQL appears at the wrong location. Fix: in a stored procedure DvPreProcessSql comes first and DvPreSourceSql directly follows it, and on Databricks and a Fabric lakehouse DvPreSourceSql is placed only for a Staged Object source.
  3. 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.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. 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_awlt and rebuilding them via DvPostTargetSql.
  2. Disable triggers on the target table that should not fire during the ELT load process.
  3. 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.
  4. 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_DV connection must be configured.
  • Understanding of the procedure execution order is important: DvPreProcessSql, DvPreSourceSql, the staging query where there is one, and DvPostSourceSql run first. Then each Hub, Link, and Satellite load runs in turn between its DvPreTargetSql and DvPostTargetSql. DvPostProcessSql runs last.
  • Does not apply to PIT or Bridge objects.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvPreTargetSql and the target attribute to your Data Vault object.
  3. Write the SQL fragment that should execute before the load of the object.
  4. 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​

  1. Disabling indexes without re-enabling them in DvPostTargetSql -- Symptom: downstream queries fail or perform poorly because indexes remain disabled. Fix: always pair ALTER INDEX ... DISABLE in DvPreTargetSql with ALTER INDEX ... REBUILD in DvPostTargetSql.
  2. Confusing DvPreTargetSql with DvPreSourceSql -- Symptom: SQL runs once before all the loads instead of before the load of one object. Fix: use DvPreTargetSql for logic before the load of a Hub, Link, or Satellite and DvPreSourceSql for logic before the staging query.
  3. 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.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the override will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the target object to which the override will be added
inputPathStringContains the output path of the preceding task, when there is one

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch.
OutputPathNameStringYou 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​

  1. Read from a different source table or connection than what BimlFlex generates by default -- for example, sourcing dv.HUB_Customer data from a pre-processed view in AWLT_SRC instead of the staging table in BFX_STG.
  2. Apply a custom SQL query with complex joins or filters at the source level -- use this instead of DvSourcePipelinePre when you need to replace the entire source, not just add a transformation after it.
  3. 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.
  4. 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.OutputPathName must be set to the Name attribute of your source component, without .Output, so downstream transformations can connect.
  • The source component type must be consistent with the connection type (e.g., OleDbSource for OLE DB connections, AdoNetSource for ADO.NET connections).

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvSourceOverride and the target attribute to your Data Vault object.
  3. Define the replacement source component in Biml XML, including the connection, query, and column mappings.
  4. Set CustomOutput.OutputPathName to the Name attribute of your source component, without .Output.
  5. 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​

  1. Forgetting to set CustomOutput.OutputPathName -- Symptom: the SSIS package fails validation because downstream transformations have no connected input. Fix: always set CustomOutput.OutputPathName to the Name attribute of your source component, such as "OLE_SRC - MyTable", without .Output.
  2. 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> with SourceColumn/TargetColumn mappings to alias if needed.
  3. 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 / DvPostSourceSql to add SQL before or after the staging query (on Databricks and a Fabric lakehouse only for a Staged Object source).
  4. 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., OleDbSource for OLE DB, AdoNetSource for ADO.NET).
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the target object to which the pipeline will be added
inputPathStringContains the output path of the preceding task

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch.
OutputPathNameStringYou 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​

  1. Add a Data Conversion component to change the data type of a column coming from the AWLT_SRC source before it reaches the Hub insert -- use this instead of DvSourceOverride when you want to keep the default source and just add a transformation.
  2. Add a Derived Column transformation to compute a composite business key or apply a string normalization function before loading dv.HUB_Customer.
  3. Add a Lookup transformation against a reference table to enrich Satellite attributes before they are inserted into dv.SAT_Customer_Details_awlt.
  4. 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.
  5. Add a Row Count transformation for custom audit logging -- use this instead of DvSourcePipelinePre when 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 inputPath parameter provides the output path name from the preceding component; you must reference it in your component's <InputPath> element.
  • CustomOutput.OutputPathName must be set so downstream components can connect.
  • The transformation component must produce column names and types compatible with what downstream components expect.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvSourcePipelinePost and the target attribute to your Data Vault object.
  3. Define the SSIS dataflow component in Biml XML, referencing inputPath for the input and setting CustomOutput.OutputPathName for the output.
  4. 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​

  1. Forgetting to set CustomOutput.OutputPathName -- Symptom: downstream transformations have no input connection; SSIS package fails validation. Fix: always set CustomOutput.OutputPathName to "<ComponentName>.Output".
  2. 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 the inputPath parameter.
  3. 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.
  4. Using this extension point with ELT architecture -- Symptom: the extension point is ignored. Fix: for ELT, use DvPostSourceSql to add SQL after the staging query (on Databricks and a Fabric lakehouse only for a Staged Object source).
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
inputPathStringContains the output path of the preceding task

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch.
OutputPathNameStringYou 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​

  1. Add an early Data Conversion to cast columns from the AWLT_SRC source to the expected types before BimlFlex's own data conversion runs. Use this instead of DvSourcePipelinePost when the type change must happen before BimlFlex's data conversion.
  2. Insert a Conditional Split early in the data flow to discard invalid rows before they reach BimlFlex's data conversion.
  3. Add a Derived Column to create a surrogate or composite column that BimlFlex's standard transformations will reference downstream.
  4. 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 inputPath parameter 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.OutputPathName must be set so the standard BimlFlex transformations can connect downstream.
  • The transformation must preserve all columns expected by subsequent BimlFlex-generated components.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvSourcePipelinePre and the target attribute to the source object of the Data Vault load (or to the batch).
  3. Define the SSIS dataflow component in Biml XML, referencing inputPath and setting CustomOutput.OutputPathName.
  4. 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​

  1. Removing or renaming columns that BimlFlex's standard transformations expect -- Symptom: SSIS validation errors in downstream components. Fix: only add new columns or use ReplaceExisting for in-place type changes; never drop columns.
  2. Hardcoding the input path -- Symptom: breaks if BimlFlex changes the source component name. Fix: always use <#=inputPath #>.
  3. Confusing Pre with Post. Symptom: the transformation runs after BimlFlex's data conversion instead of before it. Fix: use DvSourcePipelinePre for transformations that must run before the data conversion and DvSourcePipelinePost for logic that must run after it.
  4. Using this with ELT patterns -- Symptom: extension point is ignored. Fix: for ELT, use DvPreSourceSql to add SQL before the staging query (on Databricks and a Fabric lakehouse only for a Staged Object source).
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
inputPathStringContains the output path of the preceding task

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf 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​

  1. Redirect the Data Vault output to a different table or schema than what BimlFlex metadata specifies -- for example, writing dv.HUB_Customer to a partitioned staging table with a subsequent swap operation.
  2. Change the destination component type -- for example, use an ADO.NET Destination instead of OLE DB for a specific connectivity requirement to the BFX_DV target.
  3. Adjust batch size, commit size, or constraint-checking settings on the destination for performance tuning during initial loads.
  4. Write to a flat file or other non-relational destination for a one-time export of Data Vault data through the standard pipeline.
  5. 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 inputPath parameter 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 DwhTargetOverride takes precedence if both are defined for the same object.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvTargetOverride and the target attribute to your Data Vault object.
  3. Define the replacement destination component in Biml XML, referencing inputPath for the input.
  4. 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​

  1. Having both DwhTargetOverride and DvTargetOverride defined for the same object -- Symptom: DvTargetOverride is silently ignored because DwhTargetOverride takes precedence. Fix: use only one target override per object; remove the DwhTargetOverride if you intend the DV-specific override to apply.
  2. Forgetting to reference inputPath in the <InputPath> element -- Symptom: SSIS validation fails because the destination has no input connection. Fix: always use <InputPath OutputPathName="<#=inputPath#>" />.
  3. Mismatching the table schema in <ExternalTableOutput> -- Symptom: column mapping errors in the SSIS package. Fix: ensure the Table attribute references the correct schema and table name with proper bracket escaping.
  4. Using this with ELT architecture -- Symptom: the extension point is ignored and the generated load is unchanged. Fix: for ELT, use DvPreTargetSql / DvPostTargetSql to add SQL before or after the load of the object.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
inputPathStringContains the output path of the preceding task

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch.
OutputPathNameStringYou 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​

  1. 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 DvTargetPipelinePre when you need the conversion applied after all standard target-side transformations.
  2. 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.
  3. 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.
  4. 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 inputPath parameter provides the output path from the preceding target-side transformation; reference it in your <InputPath> element.
  • CustomOutput.OutputPathName must 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 reads DwhTargetPipelinePost instead.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvTargetPipelinePost and the target attribute to your Data Vault object.
  3. Define the SSIS dataflow component in Biml XML, referencing inputPath and setting CustomOutput.OutputPathName.
  4. 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​

  1. Forgetting to set CustomOutput.OutputPathName -- Symptom: the destination component has no input; SSIS package fails validation. Fix: always set CustomOutput.OutputPathName to your component's output path.
  2. Hardcoding the input path instead of using <#=inputPath #> -- Symptom: breaks if BimlFlex changes the preceding component name. Fix: always use the inputPath parameter.
  3. 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.
  4. Confusing DvTargetPipelinePost with DvTargetPipelinePre -- Symptom: transformation runs before target-side processing instead of after. Fix: use DvTargetPipelinePost for post-target-transformation logic.
  • 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
TypeDescription
sourceTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
targetTableBimlFlexModelWrapper.ObjectsWrapperContains all information related to the object to which the pipeline will be added
inputPathStringContains the output path of the preceding task

Outputs​

Name
TypeDescription
ObjectInheritBooleanIf CustomOutput.ObjectInherit = true then the Extension Point will be applied to all the Objects associated with the batch.
OutputPathNameStringYou 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​

  1. 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 DvSourcePipelinePost when the enrichment must happen on the target side of the dataflow.
  2. 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.
  3. Add a Derived Column transformation to compute a value that the target-side lookup or hash comparison will reference.
  4. Insert an Aggregate transformation to deduplicate rows before they enter the target-side processing for dv.HUB_Customer, preventing duplicate business key inserts.
  5. Add a Data Conversion component to change column types to match what target-side lookups expect -- use this instead of DvTargetPipelinePost when 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 inputPath parameter provides the output path from the source-side chain; reference it in your <InputPath> element.
  • CustomOutput.OutputPathName must 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 reads DwhTargetPipelinePre instead.

Implementation Steps​

  1. Create a new extension point file in the BimlFlex Extension Points editor.
  2. Set the extensionpoint directive to DvTargetPipelinePre and the target attribute to your Data Vault object.
  3. Define the SSIS dataflow component in Biml XML, referencing inputPath and setting CustomOutput.OutputPathName.
  4. 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​

  1. Forgetting to set CustomOutput.OutputPathName -- Symptom: target-side transformations have no input; SSIS package fails validation. Fix: always set CustomOutput.OutputPathName to your component's output path.
  2. Hardcoding the input path instead of using <#=inputPath #> -- Symptom: breaks if BimlFlex changes the preceding source-side component. Fix: always use the inputPath parameter.
  3. 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.
  4. 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 DwhTargetPipelinePre for Data Warehouse objects.
  5. Confusing Pre with Post -- Symptom: transformation runs after target-side processing instead of before. Fix: use DvTargetPipelinePre for pre-target-transformation logic and DvTargetPipelinePost for post-target-transformation logic.
  • 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.