Solved

SSIS Custom Destination Component - Input Buffer to DataTable

Posted on 2009-07-09
2
1,353 Views
Last Modified: 2013-11-10
Hi There,

I am writing SSIS custom destination component that implements precompiled custom data processing logic in the ProcessInput method . I need to implement the exposed API that expects IDataReader object as a parameter.

My question is: what is the easy way to transform Input Pipeline buffer into DataTable or DataReader.

Many thanks in advance.
0
Comment
Question by:nognew
2 Comments
 
LVL 11

Accepted Solution

by:
CraigYellick earned 250 total points
ID: 24826047
At any given moment the buffer is a single instance of data for a set of columns, so it could be loaded into a datatable. You would then have to add rows as buffers are presented.

A DataReader returns data when requested, so its not an obvious fit for a destination.  Here's the caller's context when constructing a datareader instance:

   dim r as datareader
   r = cmd.ExecuteReader
   while r.read
     ...

The caller decides when to call the Read method, whereas your destination component will be receiving buffers from the pipeline with no obvious coordination between receiving a row and the caller requesting a row.

-- Craig
0
 
LVL 8

Author Comment

by:nognew
ID: 24840210
Thanks Craig,

I ended up with temp cache object that collects buffers data and loads it to Datatable. Then called the interface method and passed  the object:
write.Write(new DataTableReader(inputBufferCache.dataTable))

Cheers
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now