我有一个简单的数据流,我从表中读取数据,进行一些数据转换,然后将其加载到另一个表中:
但是当我运行包时,我收到以下错误:
Error: 0xC02020C5 at Atish to CRM, Data Conversion [142]: Data conversion failed while converting column "CAMPAIGNID" (27) to column "Copy of CAMPAIGNID" (206). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
Error: 0xC0209029 at Atish to CRM, Data Conversion [142]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Data Conversion.Outputs[Data Conversion Output].Columns[Copy of CAMPAIGNID]" failed because error code 0xC020907F occurred, and the error row disposition on "Data Conversion.Outputs[Data Conversion Output].Columns[Copy of CAMPAIGNID]" 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 Atish to CRM, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Data Conversion" (142) failed with error code 0xC0209029 while processing input "Data Conversion Input" (143). 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.
我的映射:
最后,由于该错误似乎在抱怨' CAMPAIGNID',目标表中的数据类型为 uniqueidentifier 。老实说,我不知道我在这里失踪了什么。
答案 0 :(得分:2)
您正在将CAMPAIGNNAME
转换为uniqueidentifier
和CAMPAIGNID
转换为string[DT_STR]
。不过,您的说明似乎表明CAMPAIGNID
必须为uniqueidentifier
此外,根据错误,您的设置似乎表示Failure on error
。如果您确定转换正确且没有截断,则可以将该属性更改为Ignore on error
。或者,您可以使用Error output
并将其重定向到另一个目的地并检查结果。
还不清楚为什么要转换所有列。添加源列和目标列的数据类型可能会更加清晰。