Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
AGurau1639681093
Contributor II
Contributor II

how to handle rejects after a TMAP? What am I doing wrong?

I am a newbie and I only had a formal training with very light and easy examples on how to do things.

Basically I’m calling a REST APi to correct a bunch of addresses. This works well, but at the end I have some addresses that are not correct and some who are.

After the addresses are corrected I have a TMap that separates the incorrect addresses of the correct one based on the errorCode (int) that I get from the rest API. Everything until TMAP (TMAP included) works as intended. Now I want to treat the rejects in a specific way and I spent days working on this without success. We use SQL server in this step. The update part ( aka 2) below) needs to happen in Oracle.

For the rejects I want to

1)insert all the records in an error table

2)update the address status (set an undeliverable_address flag) into the another addresses table.

a)I tried to use a tDBOutput to insert all the addresses in an error table but this doesnt work. (no record is inserted) I will attach screenshots. Maybe someone can tell me what am I doing wrong.

b) if I manage to get the above step to work what kind of control should I use for # 2) to update the records (aka set that flag) in another table?

c) can I just use a store procedure after the TMAP to do the insert and update (aka 1) and 2)) instead of having two separate controls?

Thanks so much for your time.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

The data appears to be leaving your tMap and going towards your tDBOutput. I see you are using a shared connection. Is that connection component set to auto commit? Look in the Advanced settings of the tDBConnection component.

 

View solution in original post

3 Replies
Anonymous
Not applicable

The data appears to be leaving your tMap and going towards your tDBOutput. I see you are using a shared connection. Is that connection component set to auto commit? Look in the Advanced settings of the tDBConnection component.

 

AGurau1639681093
Contributor II
Contributor II
Author

Thank you SO much rhall, that was it. I checked the "auto commit" in the advance setting and it worked! You are a life saver.

Anonymous
Not applicable

Not a problem 😉 It's an easy thing to miss.