【发布时间】:2014-04-29 21:06:29
【问题描述】:
我在将数据从 .CSV 获取到数据类型为 FLOAT 的列中时遇到问题。我尝试直接链接它并使用数据转换任务,但是(在这两种情况下)它一直告诉我它无法转换:
Error: 0xC02020C5 at DC_Weekly_Cost_Target csv to FatzWklyCst_Target, Data Conversion [156]: Data conversion failed while converting column "Target" (22) to column "Copy of Target" (163). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
我的研究使我使用了派生列转换编辑器。我找到了一些网站,指导我如何正确使用“表达”部分:
以上是我尝试将字符串(目标和废物)转换为数据类型 Float 的方式。使用编辑器时我没有收到错误消息(即它会让我单击 OK 而不会出现错误),但是,当我尝试运行包时收到错误消息:
Error: 0xC0049064 at DC_Weekly_Cost_Target csv to FatzWklyCst_Target, Map Target in correct datatype 1 1 [222]: An error occurred while attempting to perform a type cast.
Error: 0xC0209029 at DC_Weekly_Cost_Target csv to FatzWklyCst_Target, Map Target in correct datatype 1 1 [222]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Map Target in correct datatype 1 1" (222)" failed because error code 0xC0049064 occurred, and the error row disposition on "output column "Target_Float" (227)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
Error: 0xC0047022 at DC_Weekly_Cost_Target csv to FatzWklyCst_Target, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Map Target in correct datatype 1 1" (222) failed with error code 0xC0209029 while processing input "Derived Column Input" (223). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
这是我第一次使用派生列转换编辑器。有谁看到我做错了什么?或者,您对从 .csv 文件中获取数据到浮点数据类型列的最佳方法有什么建议吗?我感谢任何人可以给我的任何帮助。
【问题讨论】:
-
你的目的地是什么?
-
@JeffOrris:这是 SSIS,所以目的地很疯狂。
-
我正在尝试使用 OLE DB 目标任务将记录插入到数据库表中。
标签: ssis