Blank CSV File import

  • Afternoon Gents,

    We have a feed which provides csv files via ftp daily, which is then loaded to a staging table within the warehouse. This all works a treat until the odd occaision where a blank csv is downloaded.

    In this case the package executing fails and a error message stating that the row delimiter was not found.

    is there a way to ignore the file if the csv is empty?

  • Some ideas:

    1) Add a script task to conditionally delete the file before trying to import it.

    2) Call a batch file to delete all files of 0 bytes before trying to import them.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin (7/16/2015)


    Some ideas:

    1) Add a script task to conditionally delete the file before trying to import it.

    2) Call a batch file to delete all files of 0 bytes before trying to import them.

    To add to the above, I typically like to keep an empty template file (containing the header row only). By copying all the templates to my import folder first and then overlaying with source files, it eliminates the need for a bunch of conditional workflows and I can simply execute each data flow task...and know that the first step in my ETL process won't fail because of missing files.

  • Hi All,

    Please find the attachment. It may be the solution for above question.

    Please tell me if any one having another approach.

    Thanks

    Rambabu

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

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