Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can we pass rejected rows to a table (Exception Handling)

Status
Not open for further replies.

srvu

Programmer
Apr 29, 2008
49
US
In my Mapping i have used 10 tables from two databases(in SQL SERVER)
I have some conditions on data which i have given in SQ trans i.e i have used two SQ's
1st SQ trans to join tables coming from one database A
2nd SQ trans to join tables coming from other database B
later i have used two exp's each for one SQ.
SQ1.uid(varchar)& SQ2.uid(char) to trim the spaces in EXP trans.
Later used JOINER trans to join SQ1.uid=SQ2.uid to join two database tables to get some rows into target.
After joinertrans, used EXP trans to define Hard-coded values & some conditions on fields,finally to target from EXP trans.

Now,if i want to handle all rejected rows, from which stage i need to collect the data???
i have defined conditions on data from SQ trans onwards & how can i add comments other transformations other than EXP trans,i have done it for EXP using COMMENTS button.

Is it important to add comments to transformations??

Could any one help me with Exception Handling.
 
From whatever stage the rejection criteria is met. Usually that would be the last stage before the target insert/update. In your case it sounds like the last expression transformation.

I'm not clear on your comments question. I think all objects allow adding comments. You add comments where you think something needs to be explained to future readers/modifiers of your maps. I usually add comments in the individual ports doing the calculations/transformations, etc., rather than at the transformation level. You can use // to create a comment in the expression editor.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
I have filtered the rows from SQ stage,the EXP before target gets all filtered rows where some expressions are only added in that stage to all row.So,how can i handle rows from diff transformations used before target????????

Thank you for reply
 
Where do you expect the rejects to show up?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Rejected rows into the target tables are automatically stored in a "bad" file as comma-delimited transactions.
Look for the folder structure Server\BadFiles - you should find a .txt file there.
 
That's only for database errors or rejections in an update strategy. I believe he's talking about rejections based on his filter criteria (but I could be wrong... ;-).

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Instead of a filter use a router transformation and write ' rejected' rows (or whatever fits the description) to their own target..

Ties Blom

 
I agree - but the big q was at what point in the flow to do it at - so we're back to where are rejections expected?

You might have to have multiple routers and targets if you want to capture it at various states. Usually you would reject your data right before it goes to the target.

What are your requirements for this rejected data? Answer this and we can help you mo' bettah.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top