Database Reference
In-Depth Information
End With
End Sub
Add a Flat File destination adapter and connect a data flow path from the Script
component to it. Open the Flat File Destination Editor and click the New button beside
the Flat File Connection Manager drop-down. When the Flat File Format window dis-
plays, select Delimited and click the OK button. Name the Flat File connection man-
ager Flat File Header Output and supply (or select) a file path. On the Columns page,
configure a landing column for the HeaderRow column from the scrc Build Header
Row Script component. Click the OK button to return to the Flat File Destination Edit-
or. Make sure the Overwrite Data in the File checkbox (in the Connection Manager
page) is checked. It should be; this is the default. Click on the Mappings page and com-
plete the destination configuration. This Data Flow task will construct and load the
header row.
On the control flow, add a Success Precedence constraint from dft Write Header
Row to the dft Write Data Rows Data Flow task. Open the editor for dft Write Data
Rows and add a Flat File source adapter. Open the Flat File Source Editor and click the
New button to create a new Flat File connection manager. When prompted, select De-
limited. Name it Extract File Input and navigate to the MyFileHeaderEx-
tract.csv file you created earlier. On the Columns page, delete the value in the
Column Delimiter drop-down. To refresh the view, click the Refresh button. On the
Advanced page, rename the column from ID,Name,Value to Row and set the Out-
putColumnWidth property to 500 . Click the OK buttons to close the Flat File Con-
nection Manager Editor and the Flat File Source Editor.
Add a Flat File destination adapter and connect a data flow path from the Flat File
source adapter to the Flat File destination adapter. Open the Flat File destination ad-
apter and set its connection manager to the flat file header output. Be sure to uncheck
the Overwrite the Data in the File checkbox on the Connection Manager page. On the
Mappings page, map the Row column from the Available Input Columns to the Head-
erRow in the Available Destination Columns. Close the Flat File Destination Editor.
Let's make these connection managers dynamic! Click the Extract File Input Flat
File Connection Manager, and then press the F4 key to display properties. Click the
Expressions property and click the ellipsis in the Value textbox. Click the drop-
down in the Property column of the first row and click ConnectionString . In
the corresponding Expression value textbox, click the ellipsis to display the Expression
Builder. Expand the Variables and Parameters virtual folder in Expression Builder and
drag $Package::ExtractFilePath into the Expression textbox. Click the OK
Search WWH ::




Custom Search