dbTalk Databases Forums  

Primary key error handling SSIS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Primary key error handling SSIS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PRW
 
Posts: n/a

Default Primary key error handling SSIS - 10-24-2006 , 05:11 AM






Hi,

Attempting to load data from a flat file into a SQL Server 2005 db. using
the Data Flow Task.
However, some of the data contains duplicate records, throwing up an error
on the PK constraint.
I hoped that SSIS would be able to handle this using the new inbuilt Error
Handling.
However, when I set this on the Data Source Transform, and redirect failing
rows to an error table, the package still fails and no rows are re-directed.

Am I correct in thinking that SSIS only automatically handles certain types
of transform errors such as datatype conversions and expressions errors, but
cannot handle the PK constraint error ?
If so do I need to follow the same process I would have done in DTS and
build a staging table without the constraints and cleanse the data there
first ?
Are there any better methods than a staging table to cleanse the data ?

Thanks.
Paul W.

Reply With Quote
  #2  
Old   
weelin
 
Posts: n/a

Default Re: Primary key error handling SSIS - 10-24-2006 , 10:14 AM






Not an answer, but you should try posting to here
http://groups-beta.google.com/group/...ntegrationsvcs

It's the Integration Services version of this DTS group. You might
have more luck.




On Oct 24, 11:11 am, PRW <P... (AT) discussions (DOT) microsoft.com> wrote:
Quote:
Hi,

Attempting to load data from a flat file into a SQL Server 2005 db. using
the Data Flow Task.
However, some of the data contains duplicate records, throwing up an error
on the PK constraint.
I hoped that SSIS would be able to handle this using the new inbuilt Error
Handling.
However, when I set this on the Data Source Transform, and redirect failing
rows to an error table, the package still fails and no rows are re-directed.

Am I correct in thinking that SSIS only automatically handles certain types
of transform errors such as datatype conversions and expressions errors, but
cannot handle the PK constraint error ?
If so do I need to follow the same process I would have done in DTS and
build a staging table without the constraints and cleanse the data there
first ?
Are there any better methods than a staging table to cleanse the data ?

Thanks.
Paul W.


Reply With Quote
  #3  
Old   
PRW
 
Posts: n/a

Default Re: Primary key error handling SSIS - 10-25-2006 , 08:31 AM



Thanks for reply.

I did manage to find out the answer myself eventually.

Just to clarify a point though. I thought that this forum was for both dts
and ssis. Is that not correct ?
ssis does not appear under the Enterprise Development newsgroup, but is
often referred to as dts (still in MS code too !).

"weelin" wrote:

Quote:
Not an answer, but you should try posting to here
http://groups-beta.google.com/group/...ntegrationsvcs

It's the Integration Services version of this DTS group. You might
have more luck.




On Oct 24, 11:11 am, PRW <P... (AT) discussions (DOT) microsoft.com> wrote:
Hi,

Attempting to load data from a flat file into a SQL Server 2005 db. using
the Data Flow Task.
However, some of the data contains duplicate records, throwing up an error
on the PK constraint.
I hoped that SSIS would be able to handle this using the new inbuilt Error
Handling.
However, when I set this on the Data Source Transform, and redirect failing
rows to an error table, the package still fails and no rows are re-directed.

Am I correct in thinking that SSIS only automatically handles certain types
of transform errors such as datatype conversions and expressions errors, but
cannot handle the PK constraint error ?
If so do I need to follow the same process I would have done in DTS and
build a staging table without the constraints and cleanse the data there
first ?
Are there any better methods than a staging table to cleanse the data ?

Thanks.
Paul W.



Reply With Quote
  #4  
Old   
akaitatsu@gmail.com
 
Posts: n/a

Default Re: Primary key error handling SSIS - 11-06-2006 , 12:07 PM



Could you post your solution? I am having the same or similar problem
and would like to know how you resolved it.

Thank you,
Bryant

PRW wrote:
Quote:
Thanks for reply.

I did manage to find out the answer myself eventually.

Just to clarify a point though. I thought that this forum was for both dts
and ssis. Is that not correct ?
ssis does not appear under the Enterprise Development newsgroup, but is
often referred to as dts (still in MS code too !).

"weelin" wrote:

Not an answer, but you should try posting to here
http://groups-beta.google.com/group/...ntegrationsvcs

It's the Integration Services version of this DTS group. You might
have more luck.




On Oct 24, 11:11 am, PRW <P... (AT) discussions (DOT) microsoft.com> wrote:
Hi,

Attempting to load data from a flat file into a SQL Server 2005 db. using
the Data Flow Task.
However, some of the data contains duplicate records, throwing up an error
on the PK constraint.
I hoped that SSIS would be able to handle this using the new inbuilt Error
Handling.
However, when I set this on the Data Source Transform, and redirect failing
rows to an error table, the package still fails and no rows are re-directed.

Am I correct in thinking that SSIS only automatically handles certain types
of transform errors such as datatype conversions and expressions errors, but
cannot handle the PK constraint error ?
If so do I need to follow the same process I would have done in DTS and
build a staging table without the constraints and cleanse the data there
first ?
Are there any better methods than a staging table to cleanse the data ?

Thanks.
Paul W.




Reply With Quote
  #5  
Old   
PRW
 
Posts: n/a

Default Re: Primary key error handling SSIS - 11-06-2006 , 05:12 PM



Use the Sort transformation.
There is a check box to remove duplicate rows.

I also used another Sort transformation to not remove duplicate rows and
then compared the data between the two Sort outputs to show which actual rows
which were causing the duplicate data.

Hope that helps. I do also believe there are two other transformation
methods of doing this by can't clarify as I didn't test them. I recall one
was the Aggregate transform.

"akaitatsu (AT) gmail (DOT) com" wrote:

Quote:
Could you post your solution? I am having the same or similar problem
and would like to know how you resolved it.

Thank you,
Bryant

PRW wrote:
Thanks for reply.

I did manage to find out the answer myself eventually.

Just to clarify a point though. I thought that this forum was for both dts
and ssis. Is that not correct ?
ssis does not appear under the Enterprise Development newsgroup, but is
often referred to as dts (still in MS code too !).

"weelin" wrote:

Not an answer, but you should try posting to here
http://groups-beta.google.com/group/...ntegrationsvcs

It's the Integration Services version of this DTS group. You might
have more luck.




On Oct 24, 11:11 am, PRW <P... (AT) discussions (DOT) microsoft.com> wrote:
Hi,

Attempting to load data from a flat file into a SQL Server 2005 db. using
the Data Flow Task.
However, some of the data contains duplicate records, throwing up an error
on the PK constraint.
I hoped that SSIS would be able to handle this using the new inbuilt Error
Handling.
However, when I set this on the Data Source Transform, and redirect failing
rows to an error table, the package still fails and no rows are re-directed.

Am I correct in thinking that SSIS only automatically handles certain types
of transform errors such as datatype conversions and expressions errors, but
cannot handle the PK constraint error ?
If so do I need to follow the same process I would have done in DTS and
build a staging table without the constraints and cleanse the data there
first ?
Are there any better methods than a staging table to cleanse the data ?

Thanks.
Paul W.





Reply With Quote
  #6  
Old   
akaitatsu@gmail.com
 
Posts: n/a

Default Re: Primary key error handling SSIS - 11-09-2006 , 08:55 AM



Thanks! That was very helpful.

PRW wrote:
Quote:
Use the Sort transformation.
There is a check box to remove duplicate rows.

I also used another Sort transformation to not remove duplicate rows and
then compared the data between the two Sort outputs to show which actual rows
which were causing the duplicate data.

Hope that helps. I do also believe there are two other transformation
methods of doing this by can't clarify as I didn't test them. I recall one
was the Aggregate transform.

"akaitatsu (AT) gmail (DOT) com" wrote:

Could you post your solution? I am having the same or similar problem
and would like to know how you resolved it.

Thank you,
Bryant

PRW wrote:
Thanks for reply.

I did manage to find out the answer myself eventually.

Just to clarify a point though. I thought that this forum was for both dts
and ssis. Is that not correct ?
ssis does not appear under the Enterprise Development newsgroup, but is
often referred to as dts (still in MS code too !).

"weelin" wrote:

Not an answer, but you should try posting to here
http://groups-beta.google.com/group/...ntegrationsvcs

It's the Integration Services version of this DTS group. You might
have more luck.




On Oct 24, 11:11 am, PRW <P... (AT) discussions (DOT) microsoft.com> wrote:
Hi,

Attempting to load data from a flat file into a SQL Server 2005 db. using
the Data Flow Task.
However, some of the data contains duplicate records, throwing up an error
on the PK constraint.
I hoped that SSIS would be able to handle this using the new inbuilt Error
Handling.
However, when I set this on the Data Source Transform, and redirect failing
rows to an error table, the package still fails and no rows are re-directed.

Am I correct in thinking that SSIS only automatically handles certain types
of transform errors such as datatype conversions and expressions errors, but
cannot handle the PK constraint error ?
If so do I need to follow the same process I would have done in DTS and
build a staging table without the constraints and cleanse the data there
first ?
Are there any better methods than a staging table to cleanse the data ?

Thanks.
Paul W.






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.