• Phil Parkin (9/7/2013)


    Sqlraider (9/6/2013)


    I know very little about SSIS, so bear with me.

    I have a SSIS package that inserts records into a 'staging' table from a CSV file (loading one CSV file per package execution).

    The 1st production file loaded just fine - no issuses. The 2nd file loaded an additional 494,720 NULL rows (all columns for each row had NULLs) in addition to the 18,272 records I wanted to import.

    I have a flat file connection (CSV), Code Page: 20127 (US-ASCII), Format: Delimited, Text Qualifier: ", Header Row Delimiter: {CR}{LF}, Header Rows to Skip: 2, Column Delimter: Comma{,}, Data Type: unicode String [DT_WSTR] (for ALL Columns).

    I have an OLEDB Connection to my Staging table and I'm using 'fast load'.

    What could be different about the 2nd file to cause this? What 'file editor' would I need to use to see said differences? Is there a setting I could use(set) to Not load Null rows?

    Any ideas of what could be causing this?

    Thanks,

    Sqlraider

    If you open the two files in Notepad++, you should get an idea of what the difference is.

    As for avoiding the import of this dodgy data, I would use a Conditional Split component in the data flow to redirect all of the rubbish rows to an unused output - that will filter it out.

    Or just filter it out when you process the data in staging.

    I was focused on the first row of data after the 2nd header record, thinking there was something not right, when in fact there are 494720 Null records (each row is all commas) After the last 'good' data record.

    I'm going to use your suggestion of a Conditional Split for those records I don't load into the staging table. That way if for some reason I don't load a record I'll at least still have it.

    Thanks,

    Sqlraider