Share via


IDTSVirtualInput100 Interface

Definition

Represents the columns available to a component from the upstream component.

public interface class IDTSVirtualInput100 : Microsoft::SqlServer::Dts::Pipeline::Wrapper::IDTSObject100
[System.Runtime.InteropServices.Guid("FECB6DEB-654E-43EE-B87D-35F88555172E")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
public interface IDTSVirtualInput100 : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
[System.Runtime.InteropServices.Guid("3D8056A8-CA41-48E4-A3C2-74542DF68634")]
public interface IDTSVirtualInput100 : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
[System.Runtime.InteropServices.Guid("937BE9E1-F78D-4582-92EC-355CCF399702")]
public interface IDTSVirtualInput100 : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100
[<System.Runtime.InteropServices.Guid("FECB6DEB-654E-43EE-B87D-35F88555172E")>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
type IDTSVirtualInput100 = interface
    interface IDTSObject100
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
[<System.Runtime.InteropServices.Guid("3D8056A8-CA41-48E4-A3C2-74542DF68634")>]
type IDTSVirtualInput100 = interface
    interface IDTSObject100
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
[<System.Runtime.InteropServices.Guid("937BE9E1-F78D-4582-92EC-355CCF399702")>]
type IDTSVirtualInput100 = interface
    interface IDTSObject100
Public Interface IDTSVirtualInput100
Implements IDTSObject100
Attributes
Implements

Examples

The following code example shows how to use the virtual input to select the columns used by a component when programmatically building the data flow task.

public void SelectColumns(IDTSComponentMetaData100 md)  
{  
    // Create the design time instance of the component.  
    CManagedComponentWrapper wrp = md.Instantiate();  

    // Walk the input collection.  
    foreach (IDTSInput100 input in md.InputCollection)  
    {  
        // Get the virtual input columns.  
        IDTSVirtualInput100 vInput = input.GetVirtualInput();  

        // For each virtual column, set its usagetype to READONLY.  
        foreach (IDTSVirtualInputColumn100 vCol in vInput.VirtualInputColumnCollection)  
            wrp.SetUsageType(input.ID, vInput, vCol.LineageID, DTSUsageType.UT_READONLY);  
    }  
}  
Public Sub SelectColumns(ByVal md As IDTSComponentMetaData100)   
 Dim wrp As CManagedComponentWrapper = md.Instantiate   
 For Each input As IDTSInput100 In md.InputCollection   
   Dim vInput As IDTSVirtualInput100 = input.GetVirtualInput   
   For Each vCol As IDTSVirtualInputColumn100 In vInput.VirtualInputColumnCollection   
     wrp.SetUsageType(input.ID, vInput, vCol.LineageID, DTSUsageType.UT_READONLY)   
   Next   
 Next   
End Sub  

The following code example shows a custom data flow component that selects all of the DT_STR columns from the virtual input when the input is connected to a path.

public override void OnInputPathAttached(int inputID)  
{  
    IDTSInput100 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);  
    IDTSVirtualInput100 vInput = input.GetVirtualInput();  

    foreach (IDTSVirtualInputColumn100 vCol in vInput.VirtualInputColumnCollection)  
    {  
        if (vCol.DataType == DataType.DT_STR)  
        {  
            this.SetUsageType(inputID, vInput, vCol.LineageID, DTSUsageType.UT_READONLY);  
        }  
    }  
}  
Public Overrides Sub OnInputPathAttached(ByVal inputID As Integer)   
 Dim input As IDTSInput100 = ComponentMetaData.InputCollection.GetObjectByID(inputID)   
 Dim vInput As IDTSVirtualInput100 = input.GetVirtualInput   
 For Each vCol As IDTSVirtualInputColumn100 In vInput.VirtualInputColumnCollection   
   If vCol.DataType = DataType.DT_STR Then   
     Me.SetUsageType(inputID, vInput, vCol.LineageID, DTSUsageType.UT_READONLY)   
   End If   
 Next   
End Sub  

Remarks

The IDTSVirtualInput100 is retrieved by calling the GetVirtualInput method of an IDTSInput100 object. The VirtualInputColumnCollection property contains the columns that are available from the upstream components in the graph.

When programmatically building a data flow task, the virtual columns are selected for a component by calling the SetUsageType method of the CManagedComponentWrapperClass.

Developers writing custom data flow components use the virtual input to discover the available upstream columns, and, depending on the component, to add columns to the input based on the columns in the virtual collection.

Because the virtual input is a reflection of upstream columns, modifications to the virtual input or the columns in the virtual input collection do not have any impact on the IDTSOutput100 itself.

Properties

Description

Gets or sets the description of an IDTSVirtualInput100 object.

ID

Gets or sets the ID of a virtual input object.

IdentificationString

Gets a string that uniquely identifies the IDTSVirtualInput100.

IsSorted

Gets a value that indicates whether the virtual input columns in the IDTSVirtualInput100 are sorted.

Name

Gets or sets the name of an IDTSVirtualInput100.

ObjectType

Gets the DTSObjectType of an IDTSVirtualInput100.

SourceLocale

Gets the locale ID (LCID) of the source of the IDTSVirtualInput100.

VirtualInputColumnCollection

Gets the IDTSVirtualInputColumnCollection100 of an IDTSVirtualInput100.

Methods

SetUsageType(Int32, DTSUsageType)

Maps a virtual input column object and sets its usage type.

Applies to