How do I get the original rowcount file in an SSIS dataflow task?

I have a data flow task that contains an excel file as the source and a script as the destination.

Is there a way to get the number of lines in my excel file and pass it to my script component?

I have already tried the Row count component, but its value is only updated after the dataflow task has completed.

+3


source to share


2 answers


if you want to use a component Row Count

, you need to create two data flow tasks:

  • the first contains only Excel Source

    +Row Count component

  • the second contains Excel Source

    + Derived Column

    +Destination



The dumped column is used to add a variable that stores the row count as a new column

More information in this question Does the value of a variable given by a string graph transformation affect the execution of a DFT in SSIS? or the conditional separator can read the variable correctly?

+1


source


You can use a script task before the data stream that counts the lines in the Excel file and stores it in a variable.



0


source







All Articles