Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
idembel2
Creator
Creator

tWriteJSONField outputs tree, how to pass other columns?

Hi everybody,

I have an input file that contains 6 columns,

I used the first 5 columns in a component twritejsonField to get my json output tree; problem is that i need to pass also the sixth column like parameter in next component (tRestclient).

But i don't know how to pass at the same time my json output tree and the 6th column to my next component (tResClient)

Thank for help

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

Use a tFlowToIterate to iterate the input rows, add a tMap after tWriteJSonField and add a new column, set its value like:

(String)globalMap.get("row1.columnName")

the job design looks like:

tFileInputDelimited--main(row1)--tFlowToIterate--iterate--tFixedFlowInput--main--tWriteJSonField--tMap--out1-->tRestClient...

 

tFixedFlowInput: generate the current row only with 5 columns.

 

Regards

Shong

 

 

View solution in original post

3 Replies
Anonymous
Not applicable

Hi

Use a tFlowToIterate to iterate the input rows, add a tMap after tWriteJSonField and add a new column, set its value like:

(String)globalMap.get("row1.columnName")

the job design looks like:

tFileInputDelimited--main(row1)--tFlowToIterate--iterate--tFixedFlowInput--main--tWriteJSonField--tMap--out1-->tRestClient...

 

tFixedFlowInput: generate the current row only with 5 columns.

 

Regards

Shong

 

 

idembel2
Creator
Creator
Author

Hi Shong,

 

Thank you for your help, i test your idea and let you know.

 

 

idembel2
Creator
Creator
Author

I test it and it works

Thank you very much Shong