Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 6.61 KB

extending-the-data-flow-with-the-script-component.md

File metadata and controls

72 lines (53 loc) · 6.61 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords dev_langs
Extending the Data Flow with the Script Component
Extending the Data Flow with the Script Component
chugugrace
chugu
03/17/2017
sql
integration-services
reference
data flow task [Integration Services], components
data flow [Integration Services], extending
debugging [Integration Services], components
code design mode [Integration Services]
metadata [Integration Services]
scripts [Integration Services], extending data flow
data flow components [Integration Services], Script component
components [Integration Services], data flow
Script component [Integration Services], about Script component
Script component [Integration Services]
data flow [Integration Services], components
VB

Extending the Data Flow with the Script Component

[!INCLUDEsqlserver-ssis]

The Script component extends the data flow capabilities of [!INCLUDEmsCoName] [!INCLUDEssISnoversion] packages with custom code written in [!INCLUDEmsCoName] Visual Basic or [!INCLUDEmsCoName] Visual C# that is compiled and executed at package run time. The Script component simplifies the development of a custom data flow source, transformation, or destination when the sources, transformations, and destinations included with [!INCLUDEssISnoversion] do not fully satisfy your requirements. After you configure the component with the expected inputs and outputs, it writes all the required infrastructure code for you, letting you focus exclusively on the code that is required for your custom processing.

A Script component interacts with the containing package and with the data flow through the autogenerated classes in the ComponentWrapper and BufferWrapper project items, which are instances of the xref:Microsoft.SqlServer.Dts.Pipeline.ScriptComponent and the xref:Microsoft.SqlServer.Dts.Pipeline.ScriptBuffer classes respectively. These classes make connections, variables, and other package items available as typed objects, and manage inputs and outputs. The Script component can also use the [!INCLUDEvisual-basic] namespace and the [!INCLUDEdnprdnshort] class library, as well as custom assemblies, to implement custom functionality.

The Script component and the infrastructure code that it generates for you simplify significantly the process of developing a custom data flow component. However, to understand how the Script component works, you may find it useful to read the section Developing a Custom Data Flow Component to understand the steps that are involved in developing a custom data flow component.

If you are creating a source, transformation, or destination that you plan to reuse in multiple packages, you should consider developing a custom component instead of using the Script component. For more information, see Developing a Custom Data Flow Component.

In This Section

The following topics provide more information about the Script component.

Configuring the Script Component in the Script Component Editor
Properties that you configure in the Script Transformation Editor affect the capabilities and the performance of Script component code.

Coding and Debugging the Script Component
You use the [!INCLUDEmsCoName] [!INCLUDEvsprvs] Tools for Applications (VSTA) development environment to develop the scripts contained in the Script component.

Understanding the Script Component Object Model
A new Script component project contains three project items with several classes and autogenerated properties and methods.

Using Variables in the Script Component
The ComponentWrapper project item contains strongly-typed accessor properties for package variables.

Connecting to Data Sources in the Script Component
The ComponentWrapper project item also contains strongly-typed accessor properties for connections defined in the package.

Raising Events in the Script Component
You can raise events to provide notification of problems and errors.

Logging in the Script Component
You can log information to log providers enabled on the package.

Developing Specific Types of Script Components
These simple examples explain and demonstrate how to use the Script component to develop data flow sources, transformations, and destinations.

Additional Script Component Examples
These simple examples explain and demonstrate a few possible uses for the Script component.

See Also

Script Component
Comparing the Script Task and the Script Component