执行 ssis 包时出现数据转换问题

data conversion issue while executing a ssis package

正在执行我的程序包,我看到以下错误。来自源(平面文件)的 EMP IDDT_STR(50) 并将其加载到 table:

EMP_ID int not null column

使用数据转换任务,我将其转换为四字节有符号整数

但是工作失败了。

Description: Data conversion failed while converting column "EMP ID" (105) to column "EMP ID" (25). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.". End Error Error: 2019-09-16 11:37:28.53
Code: 0xC0209029 Source: Data Flow Task 1 Data Conversion 0 - 0 [2] Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Data Conversion .Outputs[Data Conversion Output].Columns[EMP ID]" failed because error code 0xC020907F occurred, and the error row disposition on "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[EMP ID]" 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. End Error Error: 2019-09-16 11:37:28.53 Code: 0xC0047022 Source: Data Flow Task SSIS.Pipeline Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Data Conversion (2) failed with error code 0xC0209029 while processing input "Data Conversion Input" (3). 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. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:37:27 AM Finished: 11:37:28 AM Elapsed: 0.797 seconds. The package execution failed. The step failed.

主要错误是:

The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data

源列似乎包含无法转换为整数的值,您可以配置错误输出以将错误行重定向到平面文件目标,以便检查导致此错误的值。