globalMap.get returns null

Four Stars

globalMap.get returns null

Hello,

first sorry for my bad english.


I implement a Tmap which has 2 output (in order to get the rejects of inner join in the second output). Those 2 outputs go to the same Oracle table with 2 components (tDBOutput_1 and tDBOutput_2). I link a "OnComponentOk" from tDBOutput_1 to a tfixedFlowInput.


tMap --- out1 ---> tDBOutput_1 --- OnComponentOk ---> tFixedFlowInput_1

\_ --- out2 ---> tDBOutput_2


All The rows from out1 and out2 are correctly inserted in the DB table.


In the tFixedFlowInput_1 I can only get the rows inserted from tDBOutput_1 with ((Integer)globalMap.get("tDBOutput_1_NB_LINE_INSERTED")) but ((Integer)globalMap.get("tDBOutput_2_NB_LINE_INSERTED")) is always null.


Do you have any idea to find a solution?


Accepted Solutions
Forteen Stars

Re: globalMap.get returns null

@ktox , you can use on Subjob ok from the main component of job to tfixedflowinput and it should work. can you try it?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

All Replies
Forteen Stars

Re: globalMap.get returns null

@ktox ,can you show job design?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Four Stars

Re: globalMap.get returns null

I show job here job_design, tmap and tfixedflowinput

 

Thanks

Forteen Stars

Re: globalMap.get returns null

@ktox , from DB2 output component is inserting any data? if yes then you need to use on component on from tDBoutput_2 to tfixedflowinput. since in your design you use from tDBoutput_1 .

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Four Stars

Re: globalMap.get returns null

Yes, tDBOutput_1 inserts 10000 rows in table and tDBOutput_2 inserts around 2000 rows.

in tFixedFlowInput_1 -> ((Integer)globalMap.get("tDBOutput_1_NB_LINE_INSERTED")) is 10000

but ((Integer)globalMap.get("tDBOutput_2_NB_LINE_INSERTED")) is null.

 

I would like to have : ((Integer)globalMap.get("tDBOutput_1_NB_LINE_INSERTED")) + ((Integer)globalMap.get("tDBOutput_2_NB_LINE_INSERTED"))

But the job throws NullpointerException because of tDBOutput_2.

Forteen Stars

Re: globalMap.get returns null

@ktox , you can use on Subjob ok from the main component of job to tfixedflowinput and it should work. can you try it?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Four Stars

Re: globalMap.get returns null

It works fine!

 

Thank you

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog