Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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
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