Skip to main content

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

  1. Parameterise server names for environment promotion. Your EXT_AWLT_SRC project needs AWLT_SRC_ServerName and AWLT_SRC_Database parameters so the same packages work against dev, test, and production instances of AdventureWorksLT.
  2. Store credentials for SQL authentication. Your AWLT_SRC connection uses SQL authentication in production. Add AWLT_SRC_UserName and AWLT_SRC_UserPassword parameters and reference them from a ConnectionExpression extension point.
  3. Add a feature flag parameter. Your LOAD_BFX_DV project needs a EnableFullLoad boolean parameter that controls whether packages perform delta or full extraction.
  4. 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.
  5. Add file path parameters. Your project needs an ImportPath parameter for flat file source connections that changes between environments.
  6. 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.
  7. Add import and archive path parameters for flat file projects. Your flat file extraction project needs MyImportPath and MyArchivePath parameters so the file loop and archive tasks can reference configurable directories (e.g., C:\Biml\MyImport and C:\Biml\MyArchive).

Prerequisites

  • Object types: Applies to BimlFlex Project objects
  • Deployment target: SSIS only — project parameters are an SSIS concept. For ADF, use AdfPipelineParameter or AdfGlobalParameter
  • Required metadata: The project must exist in BimlFlex metadata
  • Related extension points: Typically paired with ConnectionExpression (which references the parameters in SSIS expressions) and ParameterBindings (to pass parameters to child packages)

Implementation Steps

  1. In BimlFlex, open the Extension Points editor.
  2. Create a new extension point file. Select ProjectParameter as the type.
  3. Set the target attribute to the project name (e.g., EXT_AWLT_SRC).
  4. Define one or more <Parameter> elements with Name, DataType, and optionally IsRequired and a default value.
  5. 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 set IsSensitive="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 AdfPipelineParameter or AdfGlobalParameter for ADF deployments.
  • Mistake: Referencing a project parameter in a ConnectionExpression without 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.
  • ConnectionExpression — References project parameters to build dynamic connection strings
  • ParameterBindings — Pass project parameters to child packages in the batch
  • PackageParameter — 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
TypeDescription
projectBimlFlexModelWrapper.ProjectsWrapperContains 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

  1. Custom file archiving logic. Your EXT_AWLT_SRC project 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.
  2. 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.
  3. 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.
  4. 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), or PreProcess (to execute before processing)

Implementation Steps

  1. In BimlFlex, open the Extension Points editor.
  2. Create a new extension point file. Select ProjectScriptFile as the type.
  3. Set the target attribute to the project name (e.g., EXT_AWLT_SRC).
  4. Define the <ScriptTaskProject> element with ProjectCoreName and Name.
  5. Add the required assembly references for your script.
  6. Write the C# code in the <File> element.
  7. 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 ProjectCoreName that 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 like SC_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 via PackageVariable or are standard BimlFlex variables.
  • Mistake: Forgetting to set Dts.TaskResult at the end of the script. Symptom: The script task shows as "completed" but downstream precedence constraints may not evaluate correctly. Fix: Always set Dts.TaskResult = (int)DTSExecResult.Success (or Failure) before the method returns.
  • SourceFileArchiveOverride — Override the default file archiving control flow task to use your custom script
  • PostProcess — Execute the script task after the main object process
  • PreProcess — Execute the script task before the main object process
  • PackageVariable — Define variables that the script reads or writes