Overview
The Script Component Plus is an SSIS Data Flow component and it is an extension of the standard Microsoft Script Component. It provides benefits similar to Script Task Plus, but for the Microsoft Data Flow Task. You can reuse your data flow script code and build a user interface to simplify your script configuration. These features reduce the need to implement custom SSIS script components. See the public script repository for useful components and samples.
The component dialog contains the following elements:
- Setup tab - Select script initialization parameters. The Setup tab configuration is made with attributes in the script.
- Advanced tab - Setup of the standard Microsoft Script Component configuration parameters. You can modify the script code in this tab.
- - export the SSIS script to an external file (.scx).
- - link to the SSIS script from an external file (.scx). The link can be removed by pressing the button again.
Setup
The initialization and user interface for a script is defined by implementing properties on the ScriptMain class. The user interface is contained in the property grid view and it is available by selecting the Setup tab in the COZYROC Script Component dialog. We urge you to familiarize yourself with the PropertyGrid class. This is the class used for presentation; specified attributes below are related directly to it.
See the samples below for how to implement script component parameters. These samples are specific to the script component. The attributes demonstrated in the Script Task Plus samples can also be used.
Extended script component base class
The extended script component base class contains the following additional features:
- HostComponent - property to access the hosting component object.
- DesignConnections - property containing package connections list. To be used only in design mode.
Extended buffer base class
The extended buffer base class contains the following additional features:
- Buffer - property to access the internal buffer object. This object is usually needed when working with dynamically processed columns.
- StaticInputColumns - access to the list of specified static input columns.
- StaticOutputColumns - access to the list of specified static output columns.
Component connection parameter
The Connection attribute described in Script Task Plus has an additional constructor with the isConnectionID parameter. When the parameter is set to true, the component connection property will contain the connection ID, instead of the connection name. Set this parameter to true in your script component to be able to use the package connection manager.
Script Attributes
Define the property associated with the Input attribute.
Define property attributed with the InputColumn attribute, setting for parameter the property containing input name. Defining InputColumn without parameter will retrieve the first component input columns. You can ask the user for single or multiple columns selection.
Define property attributed with the InputExternalColumn attribute, setting for parameter the property containing input name. Defining InputExternalColumn without parameter will retrieve the first component input external columns. You can ask the user for single or multiple columns selection.
Define property attributed with the InputVirtualColumn attribute, setting for parameter the property containing input name. Defining InputVirtualColumn without parameter will retrieve the first component input virtual columns. You can ask the user for single or multiple columns selection.
Define the property associated with the Output attribute.
Define property attributed with the OutputColumn attribute, setting for parameter the property containing output name. Defining OutputColumn without parameter will retrieve the first component output columns. You can ask the user for single or multiple columns selection.
Define property attributed with the OutputExternalColumn attribute, setting for parameter the property containing output name. Defining OutputExternalColumn without parameter will retrieve the first component output external columns. You can ask the user for single or multiple columns selection.
To enable the script Mappings tab, associate your script main class with the ColumnMappings attribute.
Knowledge Base
- Where can I find the documentation for the Script Component Plus?
- How to upgrade a script in Script Component Plus from 2005 to 2008
- Where can I find scripts for the Script Task Plus and Script Component Plus?
What's New
- Fixed: Failed with error "Object reference not set to an instance of an object" when trying to open dialog in Visual Studio 2019.
- Fixed: Failed to link to script when using SSDT for Visual Studio 2015 (Thank you, Shaikshavali).
- Fixed: Failed to link to script when target platform version was set to SQL Server 2012 in SSDT OneDesigner.
- New: Support for dynamic data flow.
- Fixed: Component for SQL Server 2008 failed with error when trying to add input.
- Fixed: Failed with System.MissingMethodException error when using SQL 2008R2.
- New: Component now supports setup of column mappings user interface.
- Fixed: Failed to upgrade properly from 2005 to 2008.
- Fixed: Dialog was not updating the setup tab after script modification when using SQL Server 2008.
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.