The Error
I'm importing from a text qualified, pipe delimited flat file with a the following columns (Name (Datatype, maxlength)):- CustomerIdentifier (WSTR, 120)
- GroupName (WSTR, 120)
- UserName (WSTR, 100)
- UserStatus (WSTR, 15)
- UserType (WSTR, 20)
My package was chugging along, until it failed.
Error: 2012-06-12 09:38:17.73
Code: 0xC02020A1
Source: InsertUserRecords _ Pipe Flat File Source [870]
Description: Data conversion failed. The data conversion for column "UserName" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
End Error
Error: 2012-06-12 09:38:17.73
Code: 0xC020902A
Source: InsertUserRecords _ Pipe Flat File Source [870]
Description: The "output column "UserName" (888)" failed because truncation occurred, and the truncation row disposition on "output column "UserName" (888)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
End Error
Error: 2012-06-12 09:38:17.74
Code: 0xC0202092
Source: InsertUserRecords _ Pipe Flat File Source [870]
Description: An error occurred while processing file "C:\Scratch\DataLoad\User_USERDATA.txt" on data row 25519.
End Error
I highlighted the important bits.
I opened up the offending file and read the offending line (which I sanitized before posting here).
"0DEADBEEFFACE2AADEADBEEFCAFEFACE78BEEF87"|"Group"|"S99S99S99S999S99S99S0S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99S99"|"Frequent"|"2"|
I highlighted the offending column. The text (from the first 'S' to the last '0') is 99 characters. The column width is 100, so it should have fit. I loaded it up in a hex editor and went through every character to see if there were any spurious nonprinting characters. Nope.
The Problem
The Conclusion
The Solution
Update
It appears this is only the case if the text qualifier is not set on the file level, but Text Qualified is set to True on the column level.
Second Update
I was wrong. Text qualifier was not set in the General tab. Observe:
The value I circled and put arrows toward needs to be set to the actual text qualifier. If it isn't, well, then all hell breaks loose as I described above.