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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Mercator continue to process records though a DB failure occurs!!!

Status
Not open for further replies.

MansiP

Programmer
Jul 28, 2010
1
US
Hi,

Can someone help me with below.

My map gets input records from Oracle table on one Database and inserts records into a table in another Database.

one of the column say phone_number in my input Database is 40 size and the corresponding column (phone_number) on target Database is 30. Type tree input and output columns for this column is defined with 40 and 100 size respectively.

Say I have 100 records coming from input db out of which one record has data for the field phone_number with 35 bytes then type trees validate them successfully but map fails inserting this data into target db because target column is of size 30 bytes. This error is causing the entire map to fail, instead we want the map to process the rest all records ignoring the failure (or catching the db exeption). Is this possible?? If so, wat can be the options.

Thanks in advance!!
 
Hi MansiP

I think it just truncates the data - no error (using Mercator v6.7).

Richard
 
Sounds like your type tree is incorrect. Did you build your output type tree (for the target DB) using DBID (Data Base Interface Designer)?

If so, your output fields should all match the DB column parameters for min/max/numeric/date/etc formatting.

If not, you'll need to update the tree manually so your field is defined to match your column or you'll you can use the DBID to build your tree. Remember though, you'll need to set your column key in the DBID after you define your tree.

Once your tree is defined to match your table requirements data longer than the max length will be truncated.
 
sorry, in answer to your question....

"..instead we want the map to process the rest all records ignoring the failure (or catching the db exeption). Is this possible?? If so, wat can be the options. "

No, not the way you are thinking. Once the data is loaded to your output card and ready to be inserted into the DB it's all or none.

There are several options...

1. The best option is to fix your type tree so you don't need to worry about the issue.

2. Another option would be to load/update the tables using sql loader (sqlldr). The map can control the sqlldr scripts, log files and more. Sqlldr can commit table changes row by row.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top