Project Extension Points
The Project category has the following available Extension Points defined.
Project Parameter
Add additional parameters to a Project. This only applies to SSIS deployments.
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="ProjectParameter" #>
<Parameter Name="ServerName" DataType="String" IsRequired="true">localhost</Parameter>
<Parameter Name="UserName" DataType="String" IsRequired="true">varigence</Parameter>
<Parameter Name="UserPassword" DataType="String" IsRequired="true">P@ssw0rd!</Parameter>
What It Does
Adds custom SSIS project parameters to the generated BimlFlex project. Project parameters are the standard mechanism for externalising configuration values — server names, credentials, file paths, feature flags — so that the same packages can be deployed across dev, test, and production environments without modification. These parameters are set at deployment time through the SSIS Catalog or SSIS configuration files.
Where It Fires
Referenced in 6 BimlScript files including 0.00.1-flx-import-environment.biml (during environment import) and 90.flx-i-get-pkg-project.biml (during project generation). The parameters are collected early in the build process and made available to all packages within the project. They are injected into the <Parameters> section of the generated SSIS project.
When to Use It
- Parameterise server names for environment promotion. Your
EXT_AWLT_SRCproject needsAWLT_SRC_ServerNameandAWLT_SRC_Databaseparameters so the same packages work against dev, test, and production instances of AdventureWorksLT. - Store credentials for SQL authentication. Your
AWLT_SRCconnection uses SQL authentication in production. AddAWLT_SRC_UserNameandAWLT_SRC_UserPasswordparameters and reference them from aConnectionExpressionextension point. - Add a feature flag parameter. Your
LOAD_BFX_DVproject needs aEnableFullLoadboolean parameter that controls whether packages perform delta or full extraction. - Use this instead of package-level variables when the value must be consistent across all packages in the project and configurable at deployment time. Package variables are runtime-only; project parameters are deployment-time configurable through the SSIS Catalog.
- Add file path parameters. Your project needs an
ImportPathparameter for flat file source connections that changes between environments. - Define parameters globally across all projects. Use
target="@@global"to add parameters (e.g.,BimlCatalog_ConnectionString, Snowflake DSN credentials) that every project in the BimlFlex solution can reference. This avoids duplicating the same parameter definition in each project's extension point. - Add import and archive path parameters for flat file projects. Your flat file extraction project needs
MyImportPathandMyArchivePathparameters so the file loop and archive tasks can reference configurable directories (e.g.,C:\Biml\MyImportandC:\Biml\MyArchive).
Prerequisites
- Object types: Applies to BimlFlex Project objects
- Deployment target: SSIS only — project parameters are an SSIS concept. For ADF, use
AdfPipelineParameterorAdfGlobalParameter - Required metadata: The project must exist in BimlFlex metadata
- Related extension points: Typically paired with
ConnectionExpression(which references the parameters in SSIS expressions) andParameterBindings(to pass parameters to child packages)
Implementation Steps
- In BimlFlex, open the Extension Points editor.
- Create a new extension point file. Select ProjectParameter as the type.
- Set the
targetattribute to the project name (e.g.,EXT_AWLT_SRC). - Define one or more
<Parameter>elements withName,DataType, and optionallyIsRequiredand a default value. - Build the project and verify the parameters appear in the generated SSIS project.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="ProjectParameter" target="EXT_AWLT_SRC" #>
<Parameter Name="AWLT_SRC_ServerName" DataType="String" IsRequired="true">localhost</Parameter>
<Parameter Name="AWLT_SRC_Database" DataType="String" IsRequired="true">AdventureWorksLT</Parameter>
<Parameter Name="AWLT_SRC_UserName" DataType="String" IsRequired="true">svc_etl</Parameter>
<Parameter Name="AWLT_SRC_UserPassword" DataType="String" IsRequired="true" IsSensitive="true">P@ssw0rd!</Parameter>
Example
Before (default — only BimlFlex-generated parameters):
<Parameters>
<Parameter Name="ExecutionID" DataType="Int64">0</Parameter>
</Parameters>
After (ProjectParameter applied):
<Parameters>
<Parameter Name="ExecutionID" DataType="Int64">0</Parameter>
<Parameter Name="AWLT_SRC_ServerName" DataType="String" IsRequired="true">localhost</Parameter>
<Parameter Name="AWLT_SRC_Database" DataType="String" IsRequired="true">AdventureWorksLT</Parameter>
<Parameter Name="AWLT_SRC_UserName" DataType="String" IsRequired="true">svc_etl</Parameter>
<Parameter Name="AWLT_SRC_UserPassword" DataType="String" IsRequired="true" IsSensitive="true">P@ssw0rd!</Parameter>
</Parameters>
Common Mistakes
- Mistake: Creating a parameter with a name that conflicts with a BimlFlex-generated parameter (e.g.,
ExecutionID). Symptom: Build error due to duplicate parameter names. Fix: Check the generated project for existing parameter names before adding new ones. - Mistake: Forgetting to mark sensitive parameters with
IsSensitive="true". Symptom: Passwords are stored in plain text in the SSIS Catalog. Fix: Always setIsSensitive="true"for credentials and secrets. - Mistake: Using ProjectParameter for an ADF project. Symptom: The parameters are silently ignored — ADF has no concept of SSIS project parameters. Fix: Use
AdfPipelineParameterorAdfGlobalParameterfor ADF deployments. - Mistake: Referencing a project parameter in a
ConnectionExpressionwithout creating it first. Symptom: SSIS validation error: "The variable was not found." Fix: Ensure the ProjectParameter extension point is defined before any ConnectionExpression that references it.
Related Extension Points
ConnectionExpression— References project parameters to build dynamic connection stringsParameterBindings— Pass project parameters to child packages in the batchPackageParameter— Add parameters at the package level rather than the project level
Project Script File
Add a ScriptTask or ScriptComponent to a Project. This only applies to SSIS deployments.
Parameters
Name | Type | Description |
|---|---|---|
| project | BimlFlexModelWrapper.ProjectsWrapper | Contains all information related to the project to which the script will be added |
Template
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="ProjectScriptFile" #>
<#@ property name="project" type="BimlFlexModelWrapper.ProjectsWrapper" #>
<ScriptTaskProject ProjectCoreName="SC_SAMPLE_SCRIPT" Name="SC_SAMPLE_SCRIPT">
<AssemblyReferences>
<AssemblyReference AssemblyPath="Microsoft.SqlServer.ManagedDTS.dll" />
<AssemblyReference AssemblyPath="Microsoft.SqlServer.ScriptTask.dll" />
<AssemblyReference AssemblyPath="System.dll" />
<AssemblyReference AssemblyPath="System.AddIn.dll" />
<AssemblyReference AssemblyPath="System.Data.dll" />
<AssemblyReference AssemblyPath="System.Windows.Forms.dll" />
<AssemblyReference AssemblyPath="System.Xml.dll" />
</AssemblyReferences>
<Files>
<File Path="ScriptMain.cs">using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
[Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
{
#region VSTA generated code
enum ScriptResults
{
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
};
#endregion
public void Main()
{
MessageBox.Show("Sample Script File");
Dts.TaskResult = (int)ScriptResults.Success;
}
}
</File>
</Files>
</ScriptTaskProject>
What It Does
Adds a custom SSIS Script Task or Script Component project to the generated BimlFlex project. Script tasks contain C# or VB.NET code that executes as part of an SSIS package's control flow or data flow. This extension point lets you define reusable script projects that can be referenced by multiple packages — for example, a custom file archiving script, an email notification task, or a data quality validation component.
Where It Fires
Registered in bundle.common.manifest under the Project category. The script project is added to the SSIS project during build and becomes available for reference by any package in the project. It is commonly used alongside SourceFileArchiveOverride or PostProcess extension points that reference the script task by name.
When to Use It
- Custom file archiving logic. Your
EXT_AWLT_SRCproject extracts flat files from an SFTP server. The default BimlFlex archive script does not support your SFTP provider. Use ProjectScriptFile to add a custom C# script that archives files using your SFTP library. - Send email notifications on failure. Add a script task that sends an SMTP email when a package fails, including the error message and execution details from the BimlCatalog.
- Custom data quality validation. Add a Script Component that performs complex validation logic (e.g., Luhn check on credit card numbers) that cannot be expressed in SSIS expressions or SQL.
- Use this instead of external executables when you need the script to be part of the SSIS project deployment and have access to SSIS variables and connections. External executables run outside the SSIS runtime and cannot access package state.
Prerequisites
- Object types: Applies to BimlFlex Project objects
- Deployment target: SSIS only — ADF has no script task equivalent (use Azure Functions or Databricks notebooks instead)
- Required metadata: The project must exist in BimlFlex metadata
- Related extension points: Often used with
SourceFileArchiveOverride(to reference the custom script),PostProcess(to execute the script after processing), orPreProcess(to execute before processing)
Implementation Steps
- In BimlFlex, open the Extension Points editor.
- Create a new extension point file. Select ProjectScriptFile as the type.
- Set the
targetattribute to the project name (e.g.,EXT_AWLT_SRC). - Define the
<ScriptTaskProject>element withProjectCoreNameandName. - Add the required assembly references for your script.
- Write the C# code in the
<File>element. - Build and verify the script project appears in the generated SSIS project.
<#@ extension bundle="BimlFlex.bimlb" extensionpoint="ProjectScriptFile" target="EXT_AWLT_SRC" #>
<#@ property name="project" type="BimlFlexModelWrapper.ProjectsWrapper" #>
<ScriptTaskProject ProjectCoreName="SC_FILE_ARCHIVE" Name="SC_FILE_ARCHIVE">
<AssemblyReferences>
<AssemblyReference AssemblyPath="Microsoft.SqlServer.ManagedDTS.dll" />
<AssemblyReference AssemblyPath="Microsoft.SqlServer.ScriptTask.dll" />
<AssemblyReference AssemblyPath="System.dll" />
<AssemblyReference AssemblyPath="System.IO.dll" />
<AssemblyReference AssemblyPath="System.IO.Compression.dll" />
</AssemblyReferences>
<Files>
<File Path="ScriptMain.cs">using System;
using System.IO;
using System.IO.Compression;
using Microsoft.SqlServer.Dts.Runtime;
[Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
{
public void Main()
{
string sourceFile = Dts.Variables["User::SourceFullFilePath"].Value.ToString();
string archivePath = Dts.Variables["User::ArchivePath"].Value.ToString();
string archiveFile = Path.Combine(archivePath, Path.GetFileName(sourceFile) + ".gz");
using (FileStream sourceStream = File.OpenRead(sourceFile))
using (FileStream targetStream = File.Create(archiveFile))
using (GZipStream gzip = new GZipStream(targetStream, CompressionMode.Compress))
{
sourceStream.CopyTo(gzip);
}
File.Delete(sourceFile);
Dts.TaskResult = (int)DTSExecResult.Success;
}
}
</File>
</Files>
</ScriptTaskProject>
Example
Before (default — no custom script projects):
The SSIS project contains only the standard BimlFlex-generated packages and connections.
After (ProjectScriptFile applied):
The SSIS project now includes a SC_FILE_ARCHIVE script task project that can be referenced from any package via a <ScriptTask> element in the control flow.
Common Mistakes
- Mistake: Missing assembly references for the .NET classes used in the script. Symptom: Build error: "The type or namespace could not be found." Fix: Add all required
<AssemblyReference>elements for the .NET assemblies your code uses. - Mistake: Using a
ProjectCoreNamethat conflicts with an existing BimlFlex script project. Symptom: Build error due to duplicate project names. Fix: Prefix your script names (e.g.,SC_CUSTOM_prefix) to avoid conflicts with framework scripts likeSC_FILE_ARCHIVE. - Mistake: Referencing SSIS variables that do not exist in the package. Symptom: Runtime error: "Variable not found." Fix: Ensure any variables referenced in the script (e.g.,
User::SourceFullFilePath) are defined viaPackageVariableor are standard BimlFlex variables. - Mistake: Forgetting to set
Dts.TaskResultat the end of the script. Symptom: The script task shows as "completed" but downstream precedence constraints may not evaluate correctly. Fix: Always setDts.TaskResult = (int)DTSExecResult.Success(or Failure) before the method returns.
Related Extension Points
SourceFileArchiveOverride— Override the default file archiving control flow task to use your custom scriptPostProcess— Execute the script task after the main object processPreProcess— Execute the script task before the main object processPackageVariable— Define variables that the script reads or writes