SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The value violated the integrity constraints for the column while executing SSIS package


The value violated the integrity constraints for the column while executing SSIS package

Author
Message
jay.vraj.7
jay.vraj.7
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 6
I have created SSIS package which basically extract the dirty data from the table and using DQS Cleansing Transformation clean the data and load into tables according to Lookup Transformation criteria. I am getting below error at the end of the process.

Error: 0xC0202009 at Data Flow Task, CustomersDirtyNoMatch [109]: SSIS Error
Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code:0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Unspecified error".
Error: 0xC020901C at Data Flow Task, CustomersDirtyNoMatch [109]: There was an error with CustomersDirtyNoMatch.Inputs[OLE DB Destination Input].Columns[CustomerKey] on CustomersDirtyNoMatch.Inputs[OLE DB Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".
Error: 0xC0209029 at Data Flow Task, CustomersDirtyNoMatch [109]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "CustomersDirtyNoMatch.Inputs[OLE DB Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "CustomersDirtyNoMatch.Inputs[OLE DB Destination Input]" 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 "CustomersDirtyNoMatch" (109) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (122). 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.

Screen Shot of my Data Flow


For more information please refer this Document

Here's a table definition

CREATE TABLE dbo.CustomersDirty (
CustomerKey INT NOT NULL PRIMARY KEY,
FullName NVARCHAR(200) NULL,
StreetAddress NVARCHAR(200) NULL,
Updated INT NULL,
CleanCustomerKey INT NULL);

CREATE TABLE dbo.CustomersClean (
CustomerKey INT NOT NULL PRIMARY KEY,
FullName NVARCHAR(200) NULL,
StreetAddress NVARCHAR(200) NULL );

CREATE TABLE dbo.CustomersDirtyMatch (
CustomerKey INT ,
FullName NVARCHAR(200) NULL,
StreetAddress_Source NVARCHAR(200) NULL,
StreetAddress NVARCHAR(200) NULL,
StreetAddress_Status NVARCHAR(100) NULL,
StreetAddress_Confidence NVARCHAR(100) NULL,
StreetAddress_Reason NVARCHAR(4000) NULL,
Updated INT NULL,
CleanCustomerKey INT NULL,
Record_Status NVARCHAR(100) NULL );

CREATE TABLE dbo.CustomersDirtyNoMatch (
CustomerKey INT ,
FullName NVARCHAR(200) NULL,
StreetAddress_Source NVARCHAR(200) NULL,
StreetAddress NVARCHAR(200) NULL,
StreetAddress_Status NVARCHAR(100) NULL,
StreetAddress_Confidence NVARCHAR(100) NULL,
StreetAddress_Reason NVARCHAR(4000) NULL,
Updated INT NULL,
CleanCustomerKey INT NULL,
Record_Status NVARCHAR(100) NULL );


As recommended I did some change in configuration. I have added Flat File Destination adapter at the end of CustomerDirtyNoMatch destination adapter. Still data is not inserted in table though error data inserted in flat file.

Please refer this Flat File

updated data flow

frederico_fonseca
frederico_fonseca
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2973 Visits: 2084
file seems to be missing a valid value for customerkey - when you preview the data on the source component does it show you values for the customerkey column?
If not that is your issue as it will most likely be complaining that you are trying to insert a null value on a non nullable field
jay.vraj.7
jay.vraj.7
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 6
Data preview in source


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search