HiveBrain v1.2.0
Get Started
← Back to all entries
debugModerate

SSIS export to CSV Flat File Destination task, error The code page on input column is ... and is required to be

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
destinationrequiredfileerrorthecolumnssiscsvandinput

Problem

I get this error on a File Destination Task, do you know what the cause is and how to fix it ?

Package Validation Error

------------------------------
ADDITIONAL INFORMATION:

Error at export data to csv [Flat File Destination [187]]: The code page on input column "..." (958) is 1252 and is required to be 65001.


ta

Solution

The issue is caused by a clash in code pages between 1252 (i.e. Windows-1252) in SQL Server and 65001 (i.e. UTF-8) that your CSV file is expecting.

I believe one solution to the issue would be to CAST your source columns to NVARCHAR in the initial SELECT from the database, or use a Data Conversion task to convert them to Unicode strings.

An alternative would be set the code page in the Flat File Connection Manager to 1252 ANSI - Latin.

Context

StackExchange Database Administrators Q#85883, answer score: 11

Revisions (0)

No revisions yet.