SSIS Checking Header Row from a .csv file

  • I need to be able to see if the incoming csv file had a head row different than the previous files header row. That will tell me that I have new columns.

  • ericwenger1 (3/5/2015)


    I need to be able to see if the incoming csv file had a head row different than the previous files header row. That will tell me that I have new columns.

    Better to post at Data Warehousing » Integration Services

  • ericwenger1 (3/5/2015)


    I need to be able to see if the incoming csv file had a head row different than the previous files header row. That will tell me that I have new columns.

    Use a script task and use VB or C# to do the comparison.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • ericwenger1 (3/5/2015)


    I need to be able to see if the incoming csv file had a head row different than the previous files header row. That will tell me that I have new columns.

    The easiest thing to do would be to just read the first row as one large blob and save it. When the next file comes along, read the header as a blob and do a direct comparison to what you've saved using either "=" or "<>". That will certainly tell you if there's been a change.

    If you need to isolate the column names as rows, read the header row and split it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

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