Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
SSIS hitting FK violation - need to ignore the error rows - have package succeed
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Dave  
View profile   Translate to Translated (View Original)
 More options 7 Nov, 01:17
Newsgroups: microsoft.public.sqlserver.programming
From: Dave <djohanns...@gmail.com>
Date: Fri, 6 Nov 2009 17:17:20 -0800 (PST)
Local: Sat 7 Nov 2009 01:17
Subject: SSIS hitting FK violation - need to ignore the error rows - have package succeed
I'm using SSIS and i'm getting a FK violation in my OLE DB Destination
task.  I'm getting a FK violation and would like to ignore any rows
(throw them away) where the error is encountered.  The Destination
objects doesn't seem able to deal with specific kinds of errors (only
able to ignore all errors for example), and i can't get the
conditional split task to test for FK violations.

Does anyone know how to throw these rows away that hit the FK
violation?  I want the container to still succeed, and just throw bad
rows away.  If other 'real' errors are encountered i want the package
to fail.

Let me know if i could include more info to clarify.

thanks, dave


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mouser  
View profile   Translate to Translated (View Original)
 More options 7 Nov, 01:56
Newsgroups: microsoft.public.sqlserver.programming
From: "mouser" <inva...@invalid.com>
Date: Sat, 7 Nov 2009 01:56:44 GMT
Local: Sat 7 Nov 2009 01:56
Subject: Re: SSIS hitting FK violation - need to ignore the error rows - have package succeed

On  6-Nov-2009, Dave <djohanns...@gmail.com> wrote:

> I'm using SSIS and i'm getting a FK violation in my OLE DB Destination
> task.  I'm getting a FK violation and would like to ignore any rows
> (throw them away) where the error is encountered.  The Destination
> objects doesn't seem able to deal with specific kinds of errors (only
> able to ignore all errors for example), and i can't get the
> conditional split task to test for FK violations.

> Does anyone know how to throw these rows away that hit the FK
> violation?  I want the container to still succeed, and just throw bad
> rows away.  If other 'real' errors are encountered i want the package
> to fail.

> Let me know if i could include more info to clarify.

Are you using bulk loading (called "fast load" in SSIS, I believe) in your
OLE DB Destination adapter?  I don't think you can track particular errors
with bulk loading on.  If you turn off "Fast Load", the adapter will have an
error path you can use to redirect error rows elsewhere.  The error path
adds "Error Description" and "Error Code" columns to the flow, which you can
interrogate for FK violations if you needed to do something more with that
type of error.  The big downside to this approach is that performance will
be miserable for a large dataset (because bulk loading will have been turned
off).

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mouser  
View profile   Translate to Translated (View Original)
 More options 7 Nov, 02:04
Newsgroups: microsoft.public.sqlserver.programming
From: "mouser" <inva...@invalid.com>
Date: Sat, 7 Nov 2009 02:04:08 GMT
Local: Sat 7 Nov 2009 02:04
Subject: Re: SSIS hitting FK violation - need to ignore the error rows - have package succeed

On  6-Nov-2009, "mouser" <inva...@invalid.com> wrote:

You'll have to test it, but the error code for integrity violations is
-1071607683 in the OLE DB destination adapter, I believe.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave  
View profile   Translate to Translated (View Original)
 More options 7 Nov, 02:44
Newsgroups: microsoft.public.sqlserver.programming
From: Dave <djohanns...@gmail.com>
Date: Fri, 6 Nov 2009 18:44:52 -0800 (PST)
Local: Sat 7 Nov 2009 02:44
Subject: Re: SSIS hitting FK violation - need to ignore the error rows - have package succeed
On Nov 6, 6:04 pm, "mouser" <inva...@invalid.com> wrote:

i think i figured it out!  Using the lookup task just before the
destination adapter one can check for FK violations (via tailored
query) and then throw non matching rows away, and send matching rows
(where FK rows are found in lookup / reference table) to the
destination adapter for insertion.

works like a charm.

dave


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mouser  
View profile   Translate to Translated (View Original)
 More options 7 Nov, 02:57
Newsgroups: microsoft.public.sqlserver.programming
From: "mouser" <inva...@invalid.com>
Date: Sat, 7 Nov 2009 02:57:40 GMT
Local: Sat 7 Nov 2009 02:57
Subject: Re: SSIS hitting FK violation - need to ignore the error rows - have package succeed

On  6-Nov-2009, Dave <djohanns...@gmail.com> wrote:

> i think i figured it out!  Using the lookup task just before the
> destination adapter one can check for FK violations (via tailored
> query) and then throw non matching rows away, and send matching rows
> (where FK rows are found in lookup / reference table) to the
> destination adapter for insertion.

> works like a charm.

That can work too, but beware of the lookup transformation pulling massive
datasets into memory (unless you use partial caching).

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave  
View profile   Translate to Translated (View Original)
 More options 8 Nov, 01:32
Newsgroups: microsoft.public.sqlserver.programming
From: Dave <djohanns...@gmail.com>
Date: Sat, 7 Nov 2009 17:32:05 -0800 (PST)
Local: Sun 8 Nov 2009 01:32
Subject: Re: SSIS hitting FK violation - need to ignore the error rows - have package succeed
On Nov 6, 6:57 pm, "mouser" <inva...@invalid.com> wrote:

> On  6-Nov-2009, Dave <djohanns...@gmail.com> wrote:

> > i think i figured it out!  Using the lookup task just before the
> > destination adapter one can check for FK violations (via tailored
> > query) and then throw non matching rows away, and send matching rows
> > (where FK rows are found in lookup / reference table) to the
> > destination adapter for insertion.

> > works like a charm.

> That can work too, but beware of the lookup transformation pulling massive
> datasets into memory (unless you use partial caching).

oh thanks, i'll consider this also.  both pieces of info where very
helpful!

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google