Reputation: 101
I have a data flow task which contain excel file as the source and script component as the destination.
Is there a way to get the number of rows in my excel file and pass it my script component?
I already tried with Row count component but its value gets updated only after the data flow task is done.
Upvotes: 4
Views: 3270
Reputation: 37368
if you want to use Row Count
component you have to create two dataflow tasks:
Excel Source
+ Row Count component
Excel Source
+ Derived Column
+ Destination
The derived column is used to add the variable that store the row count as a new column
More info in this question Does variable value set by Row Count Transformation take effect during execution of DFT in SSIS? or Conditional Split can read a variable correctly?
Upvotes: 1
Reputation: 31795
You can use a script task before the dataflow that counts the rows in the Excel file and stores it in a variable.
Upvotes: 0