0

I have a text file created in java using UTF-16 encoding.

When I try to import I am getting a validation failure/error on the flat file source before it even begins to move data. The error is a character is not in the specified code page.

[Flat File Source [908]] Error: Data conversion failed. The data conversion for column "ACTIVE_INGREDIENT" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.

In my Flat File connection, I don't have unicode selected (as that struggles to find my CR LF line terminators), but have have set code page to 65001-UTF8.

In may flat file data source, I have changed all Internal and External Columns to be DT_WSTR in the advanced editor (I can't cahnge code page it seems, stuck on 0 with this option).

I am not doing a data conversion as I am mapping to NVARCHAR tables (the SSIS job isnt even getting this far to try to transfer data).

I cant even redirect the rows to a text file to identify them as I have the same issue trying to output to a flat file destination.

Any help appreciated.

smackenzie
  • 2,880
  • 7
  • 46
  • 99
  • Try with the data conversion transformation. – ram_sql Sep 03 '14 at 13:53
  • Could you add a data viewer to look at the rows that are causing the issue? i.e. add a derived column and drag the error flow from your flat file source to that. Right click the arrow and add a new data viewer. – Mark Wojciechowicz Sep 03 '14 at 13:54
  • I managed to open the original file using Vim (1.5 gb)... I notice the data flow is expecting 65 columns but some rows have less than that. Not sure if it's related to my issue, but it will cause me a failure anyway in 2008. I have tried data conversion, didn't help. Have increased column width in database, had more success – smackenzie Sep 03 '14 at 20:16
  • http://stackoverflow.com/questions/3586012/ssis-text-was-truncated-with-status-value-4 may contain helpful advice. – Ben Gribaudo Sep 03 '14 at 21:45
  • So I open the text file in Notepad++, have been told its a UTF-8 file. When I open the file in Notepad and change the encoding to ANSI, then the symbol for "microgram" looks ok. I switch to UTF-8 encoding and it turns to garbage. I would have through UTF-8 would be able to accomodate this, not ANSI. – smackenzie Sep 04 '14 at 17:57
  • possible duplicate of [SSIS - Flat file always ANSI never UTF-8 encoded](http://stackoverflow.com/questions/5322642/ssis-flat-file-always-ansi-never-utf-8-encoded) – Paul Sweatte Oct 06 '14 at 22:23

0 Answers0