Monday, February 20, 2012

max width for input fixed width column

Is there a maximum width for fixed width column?

I'm trying to read in a flat file (which, admittedly, has one very wide column), and it keeps breaking because of truncation when it tries to read in the file.

Any ideas?

Jim Work
What is the error exactly?|||Error: 0xC02020A1 at Data Flow Task, Flat File Source [1]: Data conversion failed. The data conversion for column "Column 1" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

Error: 0xC020902A at Data Flow Task, Flat File Source [1]: The "output column "Column 1" (157)" failed because truncation occurred, and the truncation row disposition on "output column "Column 1" (157)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

Error: 0xC0202092 at Data Flow Task, Flat File Source [1]: An error occurred while processing file "C:\data\sampleDepositFile1.txt" on data row 1.

Does that help?

|||Yes, it does.

Sounds to me like there are characters in the data that don't have a match in the codepage you are working with. Could be a non-unicode/unicode issue. Are there NULLs in the data? NULLs truncate strings as well.

What codepage are you using? 1252? What kind of data do you have in the file?|||1252 (ANSI - Latin I )

This is what the connection manager defaulted to, and I believe it matches up with my source data. Should I change it to (and go back and save the source data as) UTF-8?

Thanks for any insight you can give me!
|||How big is your column in the source file, and what have you defined in the flat file source? Pull it up in the advanced editor and ensure that the columns are the correct size there.

No comments:

Post a Comment