Zaman uyumsuz çıkışlarına ile özel dönüşümü bileşen geliştirme

Bir bileşeni ile zaman uyumsuz çıkışlarına kadar bileşeni tüm giriş satırları aldı dönüşümü satırları çıkış olamaz veya dönüşümü giriş olarak alınan her satır için bir çıkış satır üretir değil kullanın. Kadar tüm satırları okumak toplu dönüştürme, örneğin, satırlarda toplam hesaplayamıyor. Buna karşılık, ile zaman uyumlu çıkışlarına ne zaman üzerinden geçerken her veri satırı değiştirmek her zaman bir bileşeni'ni kullanabilirsiniz. Her satırda yer verilerini değiştirebilir veya her birinin giriş satırların her biri için bir değer olan bir veya daha fazla yeni sütunlar oluşturabilirsiniz. Senkron ve asenkron bileşenleri arasındaki fark hakkında daha fazla bilgi için bkz: Zaman uyumlu ve zaman uyumsuz dönüşümleri anlama.

Çünkü onlar hem hedef hem de kaynak bileşenleri olarak hareket zaman uyumsuz çıkışlarına dönüşümü bileşenlerle benzersizdir. Bu tür bir bileşen ters yönde bileşenlerinden satırları alır ve aşağı akım bileşenleri tarafından tüketilen bir satır ekler. Başka bir veri akışı bileşeni her ikisi de bu işlemleri gerçekleştirir.

Bir bileşeni ile zaman uyumlu çıkışlarına kullanılabilir akış bileşenleri sütunları bileşenden aşağı akım bileşenleri otomatik olarak kullanılabilir. Bu nedenle, bir bileşeni ile zaman uyumlu çıkışlarına sütunlar ve satırlar için sonraki bileşen sağlamak için herhangi bir çıktı sütunları tanımlamak yok. Zaman uyumsuz çıkışlarına bileşenlerle diğer taraftan-olmalıdır çıktı sütunları tanımlar ve satır aşağı akım bileşenleri sağlar. Bu nedenle bir bileşeni ile zaman uyumsuz çıkışlarına hem tasarım hem de çalışma zamanı sırasında gerçekleştirmek için daha fazla görev varsa ve bileşen Geliştirici uygulamak için daha fazla kod.

SQL Server Integration Serviceszaman uyumsuz çıkışlarına ile çeşitli dönüşümler içerir. Örneğin, sıralama dönüşümü önce onları sıralayabilirsiniz tüm satırlarını gerektirir ve bu zaman uyumsuz çıkışlarına kullanarak erişir. Tüm satırları aldıktan sonra bunları sıralar ve bunları kendi çıktı ekler.

Bu bölümde ayrıntılı olarak dönüşümleri ile zaman uyumsuz çıkışlarına geliştirmek açıklar. Görmek için örnek dönüşüm bileşeni ile zaman uyumsuz çıkışlarına, Remove Duplicates Component Sample. Kaynak bileşen geliştirme hakkında daha fazla bilgi için bkz: Özel kaynak bileşen geliştirme.

Tasarım Zamanı

Bileşeni oluşturma

SynchronousInputIDÖzelliği IDTSOutput100nesnesini tanımlayan bir çıkış zaman uyumlu veya zaman uyumsuz olup. Zaman uyumsuz bir çıktı yaratmak için çıktı ve bileşen kümesini eklemek SynchronousInputIDsıfır. Ayrıca bu özellik ayarı belirleyen veri akışı görev ayırır mı PipelineBuffernesneleri bileşen çıkış ve giriş için veya tek bir arabelleğe ve ayrılan iki nesne arasında paylaşılan.

Aşağıdaki örnek kod bir zaman uyumsuz çıkış oluşturur bir bileşeni gösterir, ProvideComponentPropertiesuygulaması.

using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;


namespace Microsoft.Samples.SqlServer.Dts
{
    [DtsPipelineComponent(DisplayName = "AsyncComponent",ComponentType = ComponentType.Transform)]
    public class AsyncComponent : PipelineComponent
    {
        public override void ProvideComponentProperties()
        {
            // Call the base class, which adds a synchronous input
            // and output.
            base.ProvideComponentProperties();

            // Make the output asynchronous.
            IDTSOutput100 output = ComponentMetaData.OutputCollection[0];
            output.SynchronousInputID = 0;
        }
    }
}
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;


namespace Microsoft.Samples.SqlServer.Dts
{
    [DtsPipelineComponent(DisplayName = "AsyncComponent",ComponentType = ComponentType.Transform)]
    public class AsyncComponent : PipelineComponent
    {
        public override void ProvideComponentProperties()
        {
            // Call the base class, which adds a synchronous input
            // and output.
            base.ProvideComponentProperties();

            // Make the output asynchronous.
            IDTSOutput100 output = ComponentMetaData.OutputCollection[0];
            output.SynchronousInputID = 0;
        }
    }
}
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime

<DtsPipelineComponent(DisplayName:="AsyncComponent", ComponentType:=ComponentType.Transform)> _
Public Class AsyncComponent
    Inherits PipelineComponent

    Public Overrides Sub ProvideComponentProperties()

        ' Call the base class, which adds a synchronous input
        ' and output.
        Me.ProvideComponentProperties()

        ' Make the output asynchronous.
        Dim output As IDTSOutput100 = ComponentMetaData.OutputCollection(0)
        output.SynchronousInputID = 0

    End Sub


End Class
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime

<DtsPipelineComponent(DisplayName:="AsyncComponent", ComponentType:=ComponentType.Transform)> _
Public Class AsyncComponent
    Inherits PipelineComponent

    Public Overrides Sub ProvideComponentProperties()

        ' Call the base class, which adds a synchronous input
        ' and output.
        Me.ProvideComponentProperties()

        ' Make the output asynchronous.
        Dim output As IDTSOutput100 = ComponentMetaData.OutputCollection(0)
        output.SynchronousInputID = 0

    End Sub


End Class

Çıktı sütunları yapılandırma ve oluşturma

Daha önce de belirtildiği gibi zaman uyumsuz bir bileşeni sütunları aşağı akım bileşenleri sütunları sağlamak için kendi çıktı sütun koleksiyonuna ekler. Bileşen gereksinimlerine bağlı olarak seçim için birden fazla tasarım zamanı yöntemleri vardır. Örneğin, tüm sütunları ters yönde bileşenlerinden aşağı akım bileşenleri geçirmek istiyorsanız, size geçersiz OnInputPathAttachedBu giriş sütunları bileşene kullanılabilir ilk yöntem olduğundan sütun ekleme yöntemi.

Bileşen çıkış oluşturursa, geçersiz sütun temel için kendi giriş seçili sütunlar üzerinde SetUsageTypeçıktı sütunları seçmek ve nasıl kullanılacağını belirtmek için yöntem.

Çıktı sütunları sütunlar ters yönde bileşenlerinden temel bir bileşeni ile zaman uyumsuz çıkışlarına oluşturur ve kullanılabilir ters yönde sütun değiştirme, bileşen, çıktı sütunu koleksiyonu güncelleştirmeniz gerekir. Bu değişiklikler sırasında bileşen tarafından algılanması gereken Validateve sabit sırasında ReinitializeMetaData.

[!NOT]

Çıktı sütunu derlemeden bir çıkış sütunu kaldırılır, veri akışındaki aşağı akım bileşenleri sütun başvurusu olumsuz etkilenir. Çıktı sütunu kaldırarak ve aşağı akım bileşenleri kırma önlemek için sütunu yeniden onarılması gerekir. Örneğin, sütun veri türü değişti, veri türü güncelleştirmeniz gerekir.

Aşağıdaki kod örneği, ters yönde bileşenden onun çıktı sütunu koleksiyonu kullanılabilir her sütun için bir çıkış sütunu ekler bir bileşeni gösterir.

public override void OnInputPathAttached(int inputID)
{
   IDTSInput100 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);
   IDTSOutput100 output = ComponentMetaData.OutputCollection[0];
   IDTSVirtualInput100 vInput = input.GetVirtualInput();

   foreach (IDTSVirtualInputColumn100 vCol in vInput.VirtualInputColumnCollection)
   {
      IDTSOutputColumn100 outCol = output.OutputColumnCollection.New();
      outCol.Name = vCol.Name;
      outCol.SetDataTypeProperties(vCol.DataType, vCol.Length, vCol.Precision, vCol.Scale, vCol.CodePage);
   }
}
public override void OnInputPathAttached(int inputID)
{
   IDTSInput100 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);
   IDTSOutput100 output = ComponentMetaData.OutputCollection[0];
   IDTSVirtualInput100 vInput = input.GetVirtualInput();

   foreach (IDTSVirtualInputColumn100 vCol in vInput.VirtualInputColumnCollection)
   {
      IDTSOutputColumn100 outCol = output.OutputColumnCollection.New();
      outCol.Name = vCol.Name;
      outCol.SetDataTypeProperties(vCol.DataType, vCol.Length, vCol.Precision, vCol.Scale, vCol.CodePage);
   }
}
Public Overrides Sub OnInputPathAttached(ByVal inputID As Integer)

    Dim input As IDTSInput100 = ComponentMetaData.InputCollection.GetObjectByID(inputID)
    Dim output As IDTSOutput100 = ComponentMetaData.OutputCollection(0)
    Dim vInput As IDTSVirtualInput100 = input.GetVirtualInput()

    For Each vCol As IDTSVirtualInputColumn100 In vInput.VirtualInputColumnCollection

        Dim outCol As IDTSOutputColumn100 = output.OutputColumnCollection.New()
        outCol.Name = vCol.Name
        outCol.SetDataTypeProperties(vCol.DataType, vCol.Length, vCol.Precision, vCol.Scale, vCol.CodePage)

    Next
End Sub
Public Overrides Sub OnInputPathAttached(ByVal inputID As Integer)

    Dim input As IDTSInput100 = ComponentMetaData.InputCollection.GetObjectByID(inputID)
    Dim output As IDTSOutput100 = ComponentMetaData.OutputCollection(0)
    Dim vInput As IDTSVirtualInput100 = input.GetVirtualInput()

    For Each vCol As IDTSVirtualInputColumn100 In vInput.VirtualInputColumnCollection

        Dim outCol As IDTSOutputColumn100 = output.OutputColumnCollection.New()
        outCol.Name = vCol.Name
        outCol.SetDataTypeProperties(vCol.DataType, vCol.Length, vCol.Precision, vCol.Scale, vCol.CodePage)

    Next
End Sub

Çalışma süresi

Zaman uyumsuz çıkışlarına bileşenlerle yöntemleri farklı bir dizi daha başka tür bileşenlerin çalışma zamanında da yürütün. Hem de bir çağrı almak sadece bileşenleri oldukları ilk PrimeOutputve ProcessInputyöntemleri. Onlar işleme başlamadan önce zaman uyumsuz çıkışlarına bileşenlerle aynı zamanda gelen satırları erişmesi; kadar tüm satırları okumak bu nedenle onlar giriş satırları dahili önbellek gerekir. Son olarak, diğer bileşenler, hem bir giriş arabellek hem de çıkış arabelleği zaman uyumsuz çıkışlarına bileşenlerle alırsınız.

Arabellekler anlama

Giriş sırasında bileşen tarafından alınan ProcessInput. Bu arabellek, arabelleğe ters yönde bileşenleri tarafından eklenen satırlar içerir. Arabellek da ters yönde bileşen çıkış sağlandı ama zaman uyumsuz bileşenin giriş derlemesine eklenmedi sütunları ek olarak bileşenin giriş sütunlar içerir.

Bileşenin sağlanan çıkış arabelleği PrimeOutput, ilk satır içermiyor. Bileşen bu arabelleği için satır ekler ve dolu olduğunda tampon aşağı akım bileşenleri sağlar. Çıkış arabelleği bileşen çıkış sütun koleksiyonu, diğer aşağı akım bileşenleri kendi çıkışlarına eklediğiniz sütunlar ek olarak tanımlı sütunlar içerir.

Bu tek bir paylaşılan arabelleğe alma zaman uyumlu çıkışlarına bileşenlerle farklı davranış budur. Paylaşılan tampon ile zaman uyumlu çıkışlarına bir bileşen bileşeninin, yukarı ve aşağı akım bileşenleri çıkışları için eklenen sütunları yanı sıra her iki giriş ve çıkış sütunları içerir.

Satır işleniyor

Giriş satırları önbelleğe alma

Bir bileşeni ile zaman uyumsuz çıkışlarına yazarken, çıkış arabelleği satırları eklemek için üç seçeneğiniz vardır. Giriş satırları alındığından ekleyebilirsiniz, bileşen ters yönde bileşenden tüm satırları aldı ya da bileşen için bunu uygun olduğunda bunları ekleyebilirsiniz kadar önbelleğe alabilir. Seçtiğiniz yöntem, bileşen gereksinimlerine bağlıdır. Örneğin, sıralama bileşen önce onlar sıralanabilir tüm akış satırları alınması gerekiyor. Bu nedenle, tüm satırlar çıkış arabelleği satırları eklemeden önce okunmuş bekler.

Onları işlemeye hazır olana kadar giriş alınan satırların bileşeni tarafından dahili olarak önbelleğe gerekir. Gelen arabellek satırları veri tablosu, çok boyutlu bir dizi ya da başka bir iç yapısı içinde önbelleğe alınabilir. Tüm satırları okumak kadar içten gelen arabellek satırları önbelleğe bir bileşen örneği için bkz: Remove Duplicates Component Sample.

Çıkış satır ekleme

Çıkış arabelleği olarak alındıkları veya tüm satırları aldıktan sonra arayarak bunu satır ekleme AddRowçıkış arabelleği yöntemini. Satırı ekledikten sonra yeni satırın her sütun değerleri ayarlayın.

Çünkü bazen daha fazla sütun çıktı arabelleği bileşen çıkış sütun koleksiyonunda, değerini ayarlamadan önce arabellekte uygun sütun dizini bulmalısınız. FindColumnByLineageIDYöntemi BufferManagerözelliği sütun dizini arabellek satırda sonra arabellek sütun değeri atamak için kullanılan belirtilen lineage kodlu döndürür.

PreExecuteÖnce çağrılan yöntemi PrimeOutputyöntemi ya da ProcessInputyöntemidir, ilk yöntem nerede BufferManagerözelliği kullanılabilir ve giriş ve çıkış arabellekleri sütunları dizinleri bulmak için ilk fırsat.

Örnek

Aşağıdaki örnek, alındıkça bu satırlar çıkış arabelleği ekler basit dönüşüm bileşeni ile zaman uyumsuz çıkışlarına göstermektedir. Bu örnek, tüm yöntemleri ve bu konuda anlatılan işlevsellik göstermek değil. Önemli yöntemleri her zaman uyumsuz çıkışlarına ile özel dönüşümü bileşen geçersiz kılmak gerekir, ama does değil içermek için Tasarım Zamanı doğrulama kodu gösterilmiştir. Ayrıca, kod ProcessInputçıktı sütunu koleksiyonu her sütun için bir sütun giriş sütun koleksiyonunda olduğunu varsaymaktadır. İle zaman uyumsuz çıkışlarına tam örnek dönüşüm bileşeni için bkz: Remove Duplicates Component Sample.

using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

namespace Microsoft.Samples.SqlServer.Dts
{
   [DtsPipelineComponent(DisplayName = "AsynchronousOutput")]
   public class AsynchronousOutput : PipelineComponent
   {
      PipelineBuffer outputBuffer;
      int[] inputColumnBufferIndexes;
      int[] outputColumnBufferIndexes;

      public override void ProvideComponentProperties()
      {
         // Let the base class add the input and output objects.
         base.ProvideComponentProperties();

         // Name the input and output, and make the
         // output asynchronous.
         ComponentMetaData.InputCollection[0].Name = "Input";
         ComponentMetaData.OutputCollection[0].Name = "AsyncOutput";
         ComponentMetaData.OutputCollection[0].SynchronousInputID = 0;
      }
      public override void PreExecute()
      {
         IDTSInput100 input = ComponentMetaData.InputCollection[0];
         IDTSOutput100 output = ComponentMetaData.OutputCollection[0];

         inputColumnBufferIndexes = new int[input.InputColumnCollection.Count];
         outputColumnBufferIndexes = new int[output.OutputColumnCollection.Count];

         for (int col = 0; col < input.InputColumnCollection.Count; col++)
            inputColumnBufferIndexes[col] = BufferManager.FindColumnByLineageID(input.Buffer, input.InputColumnCollection[col].LineageID);

         for (int col = 0; col < output.OutputColumnCollection.Count; col++)
            outputColumnBufferIndexes[col] = BufferManager.FindColumnByLineageID(output.Buffer, output.OutputColumnCollection[col].LineageID);

      }

      public override void PrimeOutput(int outputs, int[] outputIDs, PipelineBuffer[] buffers)
      {
         if (buffers.Length != 0)
            outputBuffer = buffers[0];
      }
      public override void ProcessInput(int inputID, PipelineBuffer buffer)
      {
            // Advance the buffer to the next row.
            while (buffer.NextRow())
            {
               // Add a row to the output buffer.
               outputBuffer.AddRow();
               for (int x = 0; x < inputColumnBufferIndexes.Length; x++)
               {
                  // Copy the data from the input buffer column to the output buffer column.
                  outputBuffer[outputColumnBufferIndexes[x]] = buffer[inputColumnBufferIndexes[x]];
               }
            }
         if (buffer.EndOfRowset)
         {
            // EndOfRowset on the input buffer is true.
            // Set EndOfRowset on the output buffer.
            outputBuffer.SetEndOfRowset();
         }
      }
   }
}
using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

namespace Microsoft.Samples.SqlServer.Dts
{
   [DtsPipelineComponent(DisplayName = "AsynchronousOutput")]
   public class AsynchronousOutput : PipelineComponent
   {
      PipelineBuffer outputBuffer;
      int[] inputColumnBufferIndexes;
      int[] outputColumnBufferIndexes;

      public override void ProvideComponentProperties()
      {
         // Let the base class add the input and output objects.
         base.ProvideComponentProperties();

         // Name the input and output, and make the
         // output asynchronous.
         ComponentMetaData.InputCollection[0].Name = "Input";
         ComponentMetaData.OutputCollection[0].Name = "AsyncOutput";
         ComponentMetaData.OutputCollection[0].SynchronousInputID = 0;
      }
      public override void PreExecute()
      {
         IDTSInput100 input = ComponentMetaData.InputCollection[0];
         IDTSOutput100 output = ComponentMetaData.OutputCollection[0];

         inputColumnBufferIndexes = new int[input.InputColumnCollection.Count];
         outputColumnBufferIndexes = new int[output.OutputColumnCollection.Count];

         for (int col = 0; col < input.InputColumnCollection.Count; col++)
            inputColumnBufferIndexes[col] = BufferManager.FindColumnByLineageID(input.Buffer, input.InputColumnCollection[col].LineageID);

         for (int col = 0; col < output.OutputColumnCollection.Count; col++)
            outputColumnBufferIndexes[col] = BufferManager.FindColumnByLineageID(output.Buffer, output.OutputColumnCollection[col].LineageID);

      }

      public override void PrimeOutput(int outputs, int[] outputIDs, PipelineBuffer[] buffers)
      {
         if (buffers.Length != 0)
            outputBuffer = buffers[0];
      }
      public override void ProcessInput(int inputID, PipelineBuffer buffer)
      {
            // Advance the buffer to the next row.
            while (buffer.NextRow())
            {
               // Add a row to the output buffer.
               outputBuffer.AddRow();
               for (int x = 0; x < inputColumnBufferIndexes.Length; x++)
               {
                  // Copy the data from the input buffer column to the output buffer column.
                  outputBuffer[outputColumnBufferIndexes[x]] = buffer[inputColumnBufferIndexes[x]];
               }
            }
         if (buffer.EndOfRowset)
         {
            // EndOfRowset on the input buffer is true.
            // Set EndOfRowset on the output buffer.
            outputBuffer.SetEndOfRowset();
         }
      }
   }
}
Imports System
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Namespace Microsoft.Samples.SqlServer.Dts

    <DtsPipelineComponent(DisplayName:="AsynchronousOutput")> _
    Public Class AsynchronousOutput


        Inherits PipelineComponent

        Private outputBuffer As PipelineBuffer
        Private inputColumnBufferIndexes As Integer()
        Private outputColumnBufferIndexes As Integer()

        Public Overrides Sub ProvideComponentProperties()

            ' Let the base class add the input and output objects.
            Me.ProvideComponentProperties()

            ' Name the input and output, and make the
            ' output asynchronous.
            ComponentMetaData.InputCollection(0).Name = "Input"
            ComponentMetaData.OutputCollection(0).Name = "AsyncOutput"
            ComponentMetaData.OutputCollection(0).SynchronousInputID = 0
        End Sub

        Public Overrides Sub PreExecute()

            Dim input As IDTSInput100 = ComponentMetaData.InputCollection(0)
            Dim output As IDTSOutput100 = ComponentMetaData.OutputCollection(0)

            ReDim inputColumnBufferIndexes(input.InputColumnCollection.Count)
            ReDim outputColumnBufferIndexes(output.OutputColumnCollection.Count)

            For col As Integer = 0 To input.InputColumnCollection.Count
                inputColumnBufferIndexes(col) = BufferManager.FindColumnByLineageID(input.Buffer, input.InputColumnCollection(col).LineageID)
            Next

            For col As Integer = 0 To output.OutputColumnCollection.Count
                outputColumnBufferIndexes(col) = BufferManager.FindColumnByLineageID(output.Buffer, output.OutputColumnCollection(col).LineageID)
            Next

        End Sub
        Public Overrides Sub PrimeOutput(ByVal outputs As Integer, ByVal outputIDs As Integer(), ByVal buffers As PipelineBuffer())

            If buffers.Length <> 0 Then
                outputBuffer = buffers(0)
            End If

        End Sub

        Public Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer)

                ' Advance the buffer to the next row.
                While (buffer.NextRow())

                    ' Add a row to the output buffer.
                    outputBuffer.AddRow()
                    For x As Integer = 0 To inputColumnBufferIndexes.Length

                        ' Copy the data from the input buffer column to the output buffer column.
                        outputBuffer(outputColumnBufferIndexes(x)) = buffer(inputColumnBufferIndexes(x))

                    Next
                End While

            If buffer.EndOfRowset = True Then
                ' EndOfRowset on the input buffer is true.
                ' Set the end of row set on the output buffer.
                outputBuffer.SetEndOfRowset()
            End If
        End Sub
    End Class
End Namespace
Imports System
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Namespace Microsoft.Samples.SqlServer.Dts

    <DtsPipelineComponent(DisplayName:="AsynchronousOutput")> _
    Public Class AsynchronousOutput


        Inherits PipelineComponent

        Private outputBuffer As PipelineBuffer
        Private inputColumnBufferIndexes As Integer()
        Private outputColumnBufferIndexes As Integer()

        Public Overrides Sub ProvideComponentProperties()

            ' Let the base class add the input and output objects.
            Me.ProvideComponentProperties()

            ' Name the input and output, and make the
            ' output asynchronous.
            ComponentMetaData.InputCollection(0).Name = "Input"
            ComponentMetaData.OutputCollection(0).Name = "AsyncOutput"
            ComponentMetaData.OutputCollection(0).SynchronousInputID = 0
        End Sub

        Public Overrides Sub PreExecute()

            Dim input As IDTSInput100 = ComponentMetaData.InputCollection(0)
            Dim output As IDTSOutput100 = ComponentMetaData.OutputCollection(0)

            ReDim inputColumnBufferIndexes(input.InputColumnCollection.Count)
            ReDim outputColumnBufferIndexes(output.OutputColumnCollection.Count)

            For col As Integer = 0 To input.InputColumnCollection.Count
                inputColumnBufferIndexes(col) = BufferManager.FindColumnByLineageID(input.Buffer, input.InputColumnCollection(col).LineageID)
            Next

            For col As Integer = 0 To output.OutputColumnCollection.Count
                outputColumnBufferIndexes(col) = BufferManager.FindColumnByLineageID(output.Buffer, output.OutputColumnCollection(col).LineageID)
            Next

        End Sub
        Public Overrides Sub PrimeOutput(ByVal outputs As Integer, ByVal outputIDs As Integer(), ByVal buffers As PipelineBuffer())

            If buffers.Length <> 0 Then
                outputBuffer = buffers(0)
            End If

        End Sub

        Public Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer)

                ' Advance the buffer to the next row.
                While (buffer.NextRow())

                    ' Add a row to the output buffer.
                    outputBuffer.AddRow()
                    For x As Integer = 0 To inputColumnBufferIndexes.Length

                        ' Copy the data from the input buffer column to the output buffer column.
                        outputBuffer(outputColumnBufferIndexes(x)) = buffer(inputColumnBufferIndexes(x))

                    Next
                End While

            If buffer.EndOfRowset = True Then
                ' EndOfRowset on the input buffer is true.
                ' Set the end of row set on the output buffer.
                outputBuffer.SetEndOfRowset()
            End If
        End Sub
    End Class
End Namespace
Integration Services simgesi (küçük) Integration Services ile güncel kalın

En son karşıdan yüklemeler, makaleler, örnekler ve Microsoft video yanı sıra topluluk seçili çözümleri için ziyaret Integration ServicesMSDN sayfası:


Bu güncelleştirmelerle ilgili otomatik bildirim almak için, sayfadaki RSS akışlarına abone olun.

Ayrıca bkz.

Kavramlar

Zaman uyumlu çıkışlarına ile özel dönüşümü bileşen geliştirme

Zaman uyumlu ve zaman uyumsuz dönüşümleri anlama

Uyumsuz bir dönüşümü Script bileşeni ile oluşturma