Preprocessing Files SSIS

  • Hello everyone,

    I'm trying to process files that have NUL characters w/a black background.

    Looks like a block. The client wants them to be just kicked out as a bad row.

    Some of them I can get kicked out. Other files completely fail the process with various columns being overflowing the disk I/O buffer. For tesing purposes I set the datatypes within SSIS to an Output width of 5000 along with the database being varchar 5000.

    Does anyone have any suggestions?

    Researching the issues and workarounds I see that some preprocessing can be done.

    Has anyone ran into this type of error?

    Would not copy and paste and I do not see where I can import the image outside of a hyperlink.

    Let me know your thoughts on this....

  • So it looks like the file has \0 when I search within Notepad++ when changing the Search Mode to Extended

    Continuing to search

  • Basically I have to see about removing the NULL character from the files in some type of preprocess...

  • I have had to deal with that in the past. They were flat files coming from an AS/400. My requirements said to replace NUL with a space (ASCII 32). I dealt with it in C# by reading the file byte-by-byte and doing the replacement as I wrote a new file. When done I deleted the original and carried on with processing the now-fixed-up file.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Indeed.

    I was able to use a C# script to read line by line and remove NUL value characters from the file.

    Now I'm able to load the files into database and push error(s) into an error logging table with the process continuing on.

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

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