Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tanjaj
Contributor III
Contributor III

tJavaRow does not store ontext variables

Hi,

I have a talend job which was running just fine until today. I would read date from the DB, save it as a variable and later it would use that variable in file naming, like this:

context.current_filedirectory + "/exported_xml_data/"+"oms-extract-orders_"+ context.code_name +"_"+ context.site_name+"_" +context.min_Date.replace("-","")  +"-"+ context.max_Date.replace("-","") +".xml"

I repeat, this was working correctly.

This file name should be like this :

oms-extract-orders_sitename_20200415-20200512.xml

And this is what it gives now:

oms-extract-orders_sitename_context.min_Date-context.max_Date.xml

Problem occurred in tJavaRow component.

It doesn't store input values as variable as it suppose to. This is the code in tJavaRow component:

context.min_Date = input_row.min_Date;
context.max_Date = input_row.max_Date;

In attachment is screenshot of my job. I didn't do any updates.

Any idea what went wrong?

 

 

 

 

 

Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi
Change your job design to as seen below to make sure the context variables are initialized before they are used.
read context--main--Save context
|onsubobok
DBinput--main--tJavaRow
|onsubjobok
DBInput--main--output XML files.

Do you set default value to context variables? It seems it uses default value something like "context.max_Date"

Regards
Shong

View solution in original post

4 Replies
Anonymous
Not applicable

Hi
Change your job design to as seen below to make sure the context variables are initialized before they are used.
read context--main--Save context
|onsubobok
DBinput--main--tJavaRow
|onsubjobok
DBInput--main--output XML files.

Do you set default value to context variables? It seems it uses default value something like "context.max_Date"

Regards
Shong

Anonymous
Not applicable

Hi
Change your job design to as seen below to make sure the context variables are initialized before they are used.
read context--main--Save context
|onsubobok
DBinput--main--tJavaRow
|onsubjobok
DBInput--main--output XML files.

Do you set default value to context variables? It seems it uses default value something like "context.max_Date"

Regards
Shong

tanjaj
Contributor III
Contributor III
Author

Hi Shong,

Thank you for a quick reply. It worked, order on subjobs was switched.
It is working again.

Best regards,
Tanja
tanjaj
Contributor III
Contributor III
Author

Hi Shong,

Thank you for a quick reply. It worked, order on subjobs was switched.
It is working again.

Best regards,
Tanja