Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am passing my rows through tAggregateRow and getting the max value of a particular row and storing it in tSetGlobalVar. But when I call the global variable inside my expression builder, its value is null but when I pass it through tLogRow, it gives me the correct value. Can you help me with this?
I am trying to populate the primary key for my incremental load.
@uchihammd , you need to design the below way to call the global var in tmap. have you design this way?
Hi @manodwhb ,
That was the design I was using. Initiating the global variable using a prejob. But, it was not working.
I have attached the screenshot below.
In that, If I call my Variable in tlogrow. It works. I just print it immediately after the globalvariable component.
The same doesn't work if I print it in a tjava component.
The tJava component has a simple print statement.
System.out.println((Integer)globalMap.get("myKey"));
Can you please point out what I am doing wrong?
@uchihammd , You need to use on Component of from tSetGlobalvar to tjava.then it will work.
Hi @manodwhb ,
In the second screenshot, I have used tjava from tSetGlobalVar. Shouldn't it work?
@uchihammd , no it will give null, since tjava code execute first , you have to use trigger from tSetglobalvar like on component ok.
Hi @manodwhb ,
I used the condition. But, I am still getting null. Please find the screenshot below.
Hi @manodwhb ,
This is my code. While querying from the db, I get the max of the particular column. So, I will have just one row. And I am calling that row. So,I don't think I need to call maxrow.