Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap Order

Hi,
I have a map with two output "Orders" and "OrderDetails". I want execute second map "OrderDetails" only if the first map "Order" output is successful. How can restrict this? I appreciate your help.
Regards,
Surendra
Labels (3)
10 Replies
Anonymous
Not applicable
Author

Hi Surendra
Your requirement cannot be done in tMap. The order of outputs is random and there isn't a way to shut down one output.
Regards,
Pedro
Anonymous
Not applicable
Author

Hi,
You could however output the order details to a tBufferOutput and use some Talend logic (on subjobok?) so when order data is stored another flow is started with a tBufferInput to store the orderdetails.
Hope this helps.
Regards,
Arno
Anonymous
Not applicable
Author

Thank you Arno. Yes, I can try doing that way.
Regards,
Surendra
Anonymous
Not applicable
Author

Friends,
It could be another question, but while I am working on the same job and related to this thread I thought about requesting another question.
I have tFileInput------>tMap(Orders and OrderDetails)----->tMSSqlOut
Once I finish all validation and importing Orders and OrderDetails, I have several storedproc to run passing the "OrderNumber" as a parameter. I tried passing directly from tMap (Unique OrderNumber) to tMSSqlRow but it did not work. I also tried tMSSqlRow, it did not help either. Is there a smart way of handling as a variable from input schema and use it globally throughout the job?
I appreciate your help.
Best regards,
Surendra
Anonymous
Not applicable
Author

Hi Surenda,
You might consider using a tMSSqlSP to run these stored procedures. Connect these components together with an onsubjob ok link to make the stored procedures run after loading the db.
Hope this helps.
Regards,
Arno
Anonymous
Not applicable
Author

Hi Arno,
Sorry I mistyped in previous thread, I did actually use tMSSqlSP as well. This component has always been working for me, but this is the first time I am passing parameter and it does not seem to be doing anything.
I even tried capturing the OrderNo as a global variable with tJavaRow as "spRunStoredProc 'OrderNo' ", and try executing with both tMSSsqlSP and tMSSQLRow. But could not get it working.
Would you have any sample or previous thread I can have a look with the similar scenario. Thank you for your help.
Best regards,
Surendra
Anonymous
Not applicable
Author

Actually, I got it working Arno.
What I did is: I captured Unique OrderNo as global variable once I completed inserting Order and OrderDetails. And, on subjob OK, I used MSSqlRow to call storedproc with the parameter in one go. Thanks for your help.
Regards,
Surendra
josephmundadan
Contributor
Contributor

Hi,
You could however output the order details to a tBufferOutput and use some Talend logic (on subjobok?) so when order data is stored another flow is started with a tBufferInput to store the orderdetails.
Hope this helps.
Regards,
Arno

Thanks for this info. It has helped me address this issue.
jkrfs
Creator
Creator

I have to say I'm a little shocked. This whole time using Talend I thought tMap actually output in the order you selected. This should be a feature as it should not be random.