Database Reference
In-Depth Information
Case Else
' data rows
With DataBuffer
.AddRow()
.ID = Convert.ToInt32(Row.ID)
.Name = Row.Name
End With
End Select
End Sub
This script counts the rows flowing through the Script component and uses the
number of the row to decide the disposition of the output row. A Select Case state-
ment is driven by row number detection and each row increments the row number in-
crementor ( iRowNum ). The first row is the header row and it contains the extract
metadata. The next two rows contain a scratch row of dashes and the column names,
respectively. The remainder of the file contains data rows and is addressed in the
Select Case Else condition of the Select Case statement.
Close the VSTA Projects Script Editor and click the OK button on the Script Com-
ponent Editor. Terminate the Header and Data pipelines with the data flow component
of your choice (I use Derived Column transformations named der Header and der
Data).
Test the package by executing it in the debugger. Your results should be similar to
those shown in Figure 7-19 .
Figure 7-19 . Green checks rock!
 
 
Search WWH ::




Custom Search