tMap Order

One Star

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
One Star

Re: tMap Order

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
One Star

Re: tMap Order

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
One Star

Re: tMap Order

Thank you Arno. Yes, I can try doing that way.
Regards,
Surendra
One Star

Re: tMap Order

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
One Star

Re: tMap Order

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
One Star

Re: tMap Order

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
One Star

Re: tMap Order

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
One Star

Re: tMap Order

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.
Four Stars

Re: tMap Order

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.
Seven Stars

Re: tMap Order

I don't believe it is random; I have a number of jobs working quite happily based on the order.