Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I include the value of contexts in tjavarow?
For Example:
This is my job tFileInputDelimited==Main==>tJavaRow==Main==>tFileOutputJSON
I'm trying to convert a normal text file into a JSON file, this is my text input:
Document,Files (Header)
doc_1, 2 (values)
And my output should be like this:
[{"Document":"doc_1 20180914","Files":2}]
So, My issue is when I try to include the date value through context it projects me a null value like this:
[{"Document":"doc_1 null","Files":2}]
This is the code I'm following in tJavaRow to implement it:
output_row.Document = input_row.Document+" "+context.date;
output_row.Files = Integer.parseInt(input_row.Files);
Also, I've attached a screenshot, where I need that value in instead of null in my JSON output.
Can Anyone help me with this?
Hello,
Did the tJavaRow receive a row (shown in the metrics of the flow to tJavaRow) ?
Do you want to retrieve the current date when you run the job and your context variable in date format?
Best regards
Sabrina