flat file loads to stage 1 row short of expected

  • The txt file I need to import has 965240 data rows. 965241 if you include header. Loaded to sql server stage table it has only 965239 rows.

    The file is too big to load into Excel for analysis.

    What tools do others use to find a missing row in a situation like this?

    --Quote me

  • If you have Office 2013 (x64), this file should not be too large for Excel.

    Unless there is a missing delimiter somewhere, a missing row would usually be either in the beginning or end of the file. You should be able to open the file easily in a text editor like Notepad to see if you can spot the missing row.

    If you are unable to identify the missing row, I'd suggest trying to import the entire record as one field into a staging table. By looking at the record length, you should be able to spot where there may be a missing row and/or column delimiter.

  • I usually use this to open large flat files.

    http://www.portablefreeware.com/?id=693

    You should look at the errors to find your problem. Those will help you identify the row that's missing.

    Are you sure that you're missing a row?

    Could it be that you're counting an empty row at the end of the file?

    Are you using a data flow task? or something else?

    Could you use an error handler?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • I will try your link.

    Before I received it I found that row lost was the first one. It was due to the header being lost in process of moving from raw to scrubbed file. Because next flat file source that takes this as input I have header rows to skip = 1, the first row of data was being ignored.

    I am plagued by these little issues that are caused by Col0 being tacked onto resulting flat files.

  • ...

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

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