SSIS 平面文件源中平面文件抛出错误的破管道符号

Broken pipe symbol from flat file throwing error in SSIS flat file source

我有一个平面文件,其中包含一个带有特殊字符 ¦ 的字符串。还使用 SSIS 包将此平面文件的内容移动到 table。 pacake中基本上有3种成分 1.带连接的平面文件 2.派生列 3.OLEDB连接插入数据到table

当我插入时,我遇到了以下错误

"The data conversion for the column returned a status value 4 and status text as Text was truncated or one or more characters had no match in the target code page"

派生列

中的列数据类型为DT_STR

特殊字符 ¦ 导致此问题。此字符在租用时被视为 2 个字符作为 Ħ。定义的列大小为 10,当出现此字符时,它会将其打断为 11,我们得到上面的错误。

将输出列长度更改为 11 将解决此问题。将条目插入 table 时会中断吗,因为 table 列大小为 10.

但我觉得这不是一个更好的解决方法,因为如果源文件有 2 个损坏的管道符号而不是 1 个 now.At,那时候必须再次更改大小

Screen shot of error thrown in flat file

我能够重现错误。

我将输出列更改为数据类型:DT_TEXT 在平面文件源的高级编辑器下。

希望对您有所帮助