gpt4 book ai didi

sql-server-2008 - 在 SSIS 中导入制表符分隔文件,其中一个字段大于 255 个字符

转载 作者:行者123 更新时间:2023-12-04 07:13:05 25 4
gpt4 key购买 nike

我正在导入制表符分隔文件并收到此错误。

Error: 0xC02020A1 at Task 3 - Data Load for Core Data, Flat File Source [14]: Data conversion failed. The data conversion for column "Column 85" 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 Task 3 - Data Load for Core Data, Flat File Source [14]: The "output column "Column 85" (448)" failed because truncation occurred, and the truncation row disposition on "output column "Column 85" (448)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component. Error: 0xC0202092 at Task 3 - Data Load for Core Data, Flat File Source [14]: An error occurred while processing file "C:\Metrics\report-quoteCoreData.csv" on data row 540. Error: 0xC0047038 at Task 3 - Data Load for Quote Core Data, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Flat File Source" (14) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more

当我在它似乎导入的字段之一上设置截断错误忽略时。

不幸的是我得到了

Column A ( customer ) Column B ( Location ) Column C ( should be Y or N )
Jimmy New York ssssss ( instead of Y )

在这一行中,我有一个较早的字段,它超过 255 个字符并导致 SSIS 中出现上述错误。如果我告诉它忽略错误,我就会为该行插入错误的数据。 “Ssss ....”是超过 255 个字符的字段。

这里的解决方案是什么?

最佳答案

在您的平面文件连接管理器中,您需要调整不足以容纳传入值的每一列的 OutputColumnWidth 属性。在您的示例中,Column 85 当前定义为 255 个字符,因此将其提高到一个合理的值。目标是使该值足够大以覆盖传入数据,但又不会大到浪费内存空间。

一旦您更改了连接管理器,任何使用相同 CM 的数据流都会报告列定义已更改,您需要进入它们,双击并让新的元数据滴下来。

enter image description here

我见过元数据在某些类型的转换后不会自动刷新的情况(Union All 我在看你)。作为完整性检查,双击紧接在目标(可能是 OLE DB 目标)之前的连接器。单击“元数据”选项卡并确保 Column 85 为 500 或您指定的任何值。如果不是,那么您开始沿着链条返回,找出卡住的地方。最简单的解决方法通常是删除麻烦的转换并重新添加它。

enter image description here

关于sql-server-2008 - 在 SSIS 中导入制表符分隔文件,其中一个字段大于 255 个字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8851934/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com