Package fails when importing data from flat to SQL Server
Number of columns in Flat File
ProductID,Name,ProductNumber,MakeFlag,FinishedGoodsFlag,Color,SafetyStockLevel,ReorderPoint,StandardCost
Table structure in SQL Server
[ProductID] [int] NULL,
[Name] [nvarchar](50) NULL,
[ProductNumber] [nvarchar](25) NULL,
[MakeFlag] [bit] NULL,
[FinishedGoodsFlag] [bit] NULL,
[Color] [nvarchar](15) NULL,
[SafetyStockLevel] [smallint] NULL
Used derived column to convert the data types
MakeFlag1 <add as new column> MakeFlag == "False" ? "0" : "1" Unicode string [DT_WSTR] 1
FinishedGoodsFlag1 <add as new column> FinishedGoodsFlag == "False" ? "0" : "1" Unicode string [DT_WSTR] 1
SafetyStockLevel1 <add as new column> (DT_I2)SafetyStockLevel two-byte signed integer [DT_I2]
Mapped the columns correctly with the newly created derived columns in OLE DB destination.I am getting error message in the case of 'SafetyStockLevel' . As far i know everything has been done properly here what could be the issue.Please
correct me if i am going wrong any where. Please find the error message as below
Error: 0xC0049064 at Data Flow Task, Derived Column [58]: An error occurred while attempting to perform a type cast.
Error: 0xC0209029 at Data Flow Task, Derived Column [58]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Derived Column" (58)" failed because error code 0xC0049064 occurred, and the error row disposition on "output column "SafetyStockLevel1"
(83)" 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 Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Derived Column" (58) failed with error code 0xC0209029 while processing input "Derived Column Input" (59). 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
Smash126