Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, all! Talend newbie here. I have data in an SQL Server database which I want to extract and process row by row. For each row, I want to perform a different action depending on the value of one field in the row (the same field each time). My current job so far has the following steps:
tMSSQLInput
main
tFlowToIterate
iterate
tJava
However, I now want to connect from tJava to tWriteJSONField using the runif connector but Talend won't allow that. Is there a way to do this, or a better way using different components? I'm not sure whether it should be tJava, tJavaRow, or something else altogether.
TIA,
Nick
Hi
tWriteJsonField requires an input component, so you can use tFixedFlowInput to generate the input data before tWriteJsonField.
eg
tMSSQLInput-main(row1)-->tFlowToIterate--iterate--tJava--oncomponentok--tFixedFlowInput--main--tWriteJsonField...
on tFixedFlowInput, you can get the input data which is extracted on tMssqlInput with expression like:
(String)globalMap.get("row1.columnName")
Regards
Shong
Hi
tWriteJsonField requires an input component, so you can use tFixedFlowInput to generate the input data before tWriteJsonField.
eg
tMSSQLInput-main(row1)-->tFlowToIterate--iterate--tJava--oncomponentok--tFixedFlowInput--main--tWriteJsonField...
on tFixedFlowInput, you can get the input data which is extracted on tMssqlInput with expression like:
(String)globalMap.get("row1.columnName")
Regards
Shong
Many thanks, worked perfectly!