SSIS Set Variable Transform
Set an SSIS variable from any upstream column inside the Data Flow: set, increment, append or fill a template.
Set Variable Transform is a free SSIS Data Flow transform that writes an upstream column value into an SSIS variable. Besides a plain Set, it can increment a counter, append values from many rows with separators, header and footer, or insert the value into a placeholder template.
Set Variable Transform is free in every edition. The same download also includes a trial of the paid PowerPack components
- Data Flow Transform in SSIS
- Runs in your environment
- Also runs in Azure Data Factory
- Free component (FREE edition)

At a glance
What Set Variable Transform can do
Set Variable Transform sets an SSIS variable from any upstream column inside the Data Flow, with modes to set, increment, append or fill placeholder templates.
Set variables in data flow
Set an SSIS variable from any upstream column value inside the data flow.
VariableToSet(e.g.User::vMyData)- Select the column on the Input Columns tab
Seven set modes
Choose the action to perform on the variable with VariableSetMode.
- Set, Increment, IncrementByBuffer, IncrementByColumnValue
- Append, AppendAndReplacePlaceholders, SetWithReplacePlaceholders
Counters & increments
Increase or decrease a numeric variable as rows flow through.
IncrementByaccepts a positive or negative number- Increment by buffer or by a column value
Append rows into one value
Combine values from many rows into a single variable.
RowSeparator(\r\n,\t,\n) andLastRowSeparatorHeaderandFooterstrings
Placeholder templates
Insert the upstream value into a template, along with other variable values.
<%value%>for the upstream value{{User::MyVar}}for variables
Custom value for NULL
Assign a value when the input is NULL, since SSIS doesn’t allow NULL in a variable.
UseCustomValueForNullandCustomValueForNull- Blank default: empty string for text, 0 for numbers
Capture Base64 data
Save binary data converted to a Base64 string into a variable.
- Use with Template Transform to convert Varbinary data
SQL Server 2012–2025 & ADF
Runs in your environment on SQL Server 2012–2025 and Azure-SSIS.
- SQL Server 2025, 2022, 2019, 2017, 2016, 2014, 2012 (32/64-bit)
- Azure Data Factory (SSIS IR)
- Design packages in Visual Studio 2017, 2019, 2022, or 2026
- Windows only (64-bit OS): Windows 7–11 or Windows Server 2012–2025
Logging options
Control how much is logged during package execution.
LoggingMode: Normal, Medium, Detailed or DebuggingPrefixTimestampadds a timestamp to log messages
See all features
- Free component, included in every SSIS PowerPack edition
- Set an SSIS variable inside the data flow from any upstream column
- Modes: Set, Increment, IncrementByBuffer, IncrementByColumnValue, Append, AppendAndReplacePlaceholders, SetWithReplacePlaceholders
- Increment by a positive or negative number
- Append values from many rows with row separator, last row separator, header and footer
- Insert the upstream value into a template with
<%value%> - Use variable placeholders such as
{{User::MyVar}} - Custom value for NULL input
- Save Varbinary data as a Base64 string into a variable (with Template Transform)
- Make the mode dynamic with SSIS expressions (numeric option values)
- Logging modes (Normal, Medium, Detailed, Debugging) with optional timestamp prefix
Support for SQL Server 2025, 2022, 2019, 2017, 2016, 2014, 2012 (32/64-bit) and Azure Data Factory
SQL Server 2012–2025
How it works
From the toolbox to your first run.
Key steps from the Set Variable Transform page and help file, with the screens you will see in SSDT.
Add it between a source and a destination.
Drag ZS Set Variable Transform into the Data Flow, connect a source (for example Dummy Data Source, OLE DB Source or CSV File Source) to it, and connect it to a downstream component such as Trash Destination.
- Must be connected downstream, or set the Data Flow property
RunInOptimizedMode=false - Otherwise SSIS may skip it when run from the command line or SQL Agent

Choose the upstream column to capture.
Create the target variable first (for example a String variable). Then double-click the transform and, on the Input Columns tab, check the upstream column whose value you want in the variable.

Choose the mode and the variable.
On Component Properties set VariableSetMode and VariableToSet (e.g. User::vMyData). Append modes use RowSeparator, LastRowSeparator, Header and Footer; Increment uses IncrementBy (positive or negative).
- Set, Increment, IncrementByBuffer, IncrementByColumnValue
- Append, AppendAndReplacePlaceholders, SetWithReplacePlaceholders
<%value%>and{{User::MyVar}}placeholders

Run the package.
Execute the package. Rows pass through to the destination and the variable holds the captured value; connect a Logging Task after the Data Flow to show it.

Inside the UI
Key settings, as they appear in SSDT.
Real screens from the Set Variable Transform product page. Step through them, or open any shot at full size.
Drag and drop
Drag Dummy Data Source and ZS Set Variable Transform into the Data Flow and connect them.
Articles
Worked examples that use Set Variable Transform.
Compatibility and requirements
Designed to stay inside your SSIS runtime.
- SQL Server 2012 through 2025, 32-bit and 64-bit
- Windows only, 64-bit OS required. SQL Server Express and Web editions do not include SSIS
- Azure Data Factory SSIS Integration Runtime
- Self-hosted: credentials and data stay in your environment (external API calls still reach that service)
- Fully functional 30-day trial of SSIS PowerPack
FAQ
Questions teams ask before they drop Set Variable Transform on the canvas.
What is Set Variable Transform?
Set Variable Transform is a free SSIS Data Flow transform that sets an SSIS variable from any upstream column. Besides a plain Set, it can increment a counter, append values from many rows into one variable, or insert the value into a placeholder template.
Is Set Variable Transform free?
Yes. It is included in the FREE edition of SSIS PowerPack, as well as in the Standard, Professional and Enterprise editions. See compare editions.
Why is my variable not set when the package runs from SQL Agent?
The transform must be connected to a downstream component (for example Trash Destination). If it isn’t, set the Data Flow property RunInOptimizedMode=false; otherwise the SSIS engine may skip unattached transforms when run from the command line or SQL Agent. Visual Studio turns optimization off, so it may work there without the workaround.
Which modes can I use?
VariableSetMode supports Set, Increment, IncrementByBuffer, IncrementByColumnValue, Append, AppendAndReplacePlaceholders and SetWithReplacePlaceholders. Placeholder modes use <%value%> for the upstream value and {{User::MyVar}} for variables.
What happens with NULL values?
SSIS doesn’t allow NULL in a variable. Turn on UseCustomValueForNull and set CustomValueForNull; if you leave it blank, NULL becomes an empty string for text and 0 for Int32, Int64, Decimal and Double.
Which SQL Server versions can I run it on?
SQL Server 2025, 2022, 2019, 2017, 2016, 2014, and 2012 (32- and 64-bit), plus Azure Data Factory with an SSIS Integration Runtime (packages must target SQL Server 2017). See Compatibility and requirements.
Free in every edition
Install SSIS PowerPack and drag Set Variable Transform onto the Data Flow.
Set an SSIS variable from any upstream column inside the Data Flow: set, increment, append or fill a template.
- Data Flow Transform in SSISSet Variable Transform appears in the toolbox after you install PowerPack.
- Free to useSet Variable Transform is included in the FREE edition of SSIS PowerPack.
- Live supportQuestions? Talk to a ZappySys engineer.
Talk to an engineer before or during your trial.