Database Reference
In-Depth Information
This behavior is different from earlier editions of SSIS. In previous versions, the
Flat File connection manager would raise an error. I blogged about this in a post en-
titled SSIS Design Pattern: Loading Variable-Length Rows ( ht-
tp://sqlblog.com/blogs/andy_leonard/archive/2010/05/18/
ssis-design-pattern-loading-variable-length-rows.aspx ) . That
post inspired this chapter.
Splitting Record Types
Thanks to the new functionality in the SSIS 2014 version of the Flat File connection
manager, we have all the data coming in as separate rows. But the data rows contain in-
formation of different types. The rows need to be filtered based on record type. I can
hear you thinking, “Great, Andy. Now what?” I'm glad you asked! Now we need to
parse the data as it flows through the Data Flow task. There are a couple ways to ap-
proach this, but I like the conditional split.
Drag a Conditional Split transformation onto the Data Flow task canvas and con-
nect a data flow path from the Flat File source adapter to the conditional split. Open the
editor for the transformation. In the Output Name column of the grid, enter TypeA .
Into the corresponding Condition , drag (or type) the RecordType column, ap-
pending the text == “A” (note that the “A” is in double-quotes). Repeat this for each
record type, == “B” and == “C” , as shown in Figure 7-11 .
 
Search WWH ::




Custom Search