SSIS Package - CSV file Row Count check with Destination Table count

  • Hi All,

    I have developed one SSIS package to import the CSV file values into DB table.

    Everything Works fine.:w00t:

    But i need some other workflows to CHECK the CSV file row counts with Destination table counts for confirmation to check whether i m pulling correct number of rows..

    Pls Can Any one help me???? Have been stucked at this..

  • mathews.subbu (8/5/2014)


    Hi All,

    I have developed one SSIS package to import the CSV file values into DB table.

    Everything Works fine.:w00t:

    But i need some other workflows to CHECK the CSV file row counts with Destination table counts for confirmation to check whether i m pulling correct number of rows..

    Pls Can Any one help me???? Have been stucked at this..

    What do you want to check, exactly?

    Number of rows in file vs number of rows imported?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • so this means your CSV is multiline if im not mistaken ?

  • twin.devil (8/5/2014)


    so this means your CSV is multiline if im not mistaken ?

    When would you have a non-multiline CSV? Wouldn't that just be column headings without data?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Hi ,

    My CSV file looks like this..

    Name,Number,Dept

    Subbu,7,IT

    Babu,6,CSE

    So After i inserted this CSv file into My DB table ..the Table ll show only two records in it.(As per the input file).

    Manual Solution:

    This i can know by just doing the following Manner:

    Open input CSV file in a notepad --> go to last record--> and check the count of the rows in the CSV

    file(in our case it is 2 rows) , then checking the Count with DB table count(count(*) from releavant table)..

    This can be done easily..

    AUTOMATED SOLUTION:

    But I WANNA AUTOMATED solution where i can get the CSV file count to my mail ..saying that

    Your today CSV file count is 5.

    Your DB table Count is also 5.(This can be done by counting the records with a where conditon)

    So,The SSIS Import is success.

    Else (if mismatches)

    The SSIS Import is not success.

    Can anyone say how this can be done in SSIS ?? Pls help....

  • Hi ,

    My CSV file looks like this..

    Name,Number,Dept

    Subbu,7,IT

    Babu,6,CSE

    So After i inserted this CSv file into My DB table ..the Table ll show only two records in it.(As per the input file).

    Manual Solution:

    This i can know by just doing the following Manner:

    Open input CSV file in a notepad --> go to last record--> and check the count of the rows in the CSV

    file(in our case it is 2 rows) , then checking the Count with DB table count(count(*) from releavant table)..

    This can be done easily..

    AUTOMATED SOLUTION:

    But I WANNA AUTOMATED solution where i can get the CSV file count to my mail ..saying that

    Your today CSV file count is 5.

    Your DB table Count is also 5.(This can be done by counting the records with a where conditon)

    So,The SSIS Import is success.

    Else (if mismatches)

    The SSIS Import is not success.

    Can anyone say how this can be done in SSIS ?? Pls help....

  • Hi ,

    My CSV file looks like this..

    Name,Number,Dept

    Subbu,7,IT

    Babu,6,CSE

    So After i inserted this CSv file into My DB table ..the Table ll show only two records in it.(As per the input file).

    Manual Solution:

    This i can know by just doing the following Manner:

    Open input CSV file in a notepad --> go to last record--> and check the count of the rows in the CSV

    file(in our case it is 2 rows) , then checking the Count with DB table count(count(*) from releavant table)..

    This can be done easily..

    AUTOMATED SOLUTION:

    But I WANNA AUTOMATED solution where i can get the CSV file count to my mail ..saying that

    Your today CSV file count is 5.

    Your DB table Count is also 5.(This can be done by counting the records with a where conditon)

    So,The SSIS Import is success.

    Else (if mismatches)

    The SSIS Import is not success.

    Can anyone say how this can be done in SSIS ?? Pls help....

  • Hi ,

    My CSV file looks like this..

    Name,Number,Dept

    Subbu,7,IT

    Babu,6,CSE

    So After i inserted this CSv file into My DB table ..the Table ll show only two records in it.(As per the input file).

    Manual Solution:

    This i can know by just doing the following Manner:

    Open input CSV file in a notepad --> go to last record--> and check the count of the rows in the CSV

    file(in our case it is 2 rows) , then checking the Count with DB table count(count(*) from releavant table)..

    This can be done easily..

    AUTOMATED SOLUTION:

    But I WANNA AUTOMATED solution where i can get the CSV file count to my mail ..saying that

    Your today CSV file count is 5.

    Your DB table Count is also 5.(This can be done by counting the records with a where conditon)

    So,The SSIS Import is success.

    Else (if mismatches)

    The SSIS Import is not success.

    Can anyone say how this can be done in SSIS ?? Pls help....

  • you can use the SSIS Script component to use this line of code.

    Check this Link

    hope it helps

  • Phil Parkin (8/5/2014)


    twin.devil (8/5/2014)


    so this means your CSV is multiline if im not mistaken ?

    When would you have a non-multiline CSV? Wouldn't that just be column headings without data?

    what is actually meant was this i-e

    Code, Name, Amount

    01,item1,100

    02,"item

    ,123",10

    this becomes multiline CSV.

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply