One Star

need each Dynamic query output from tMysqlInput

hi
I have a txt file which has a variable name and time stamp eg:
MARKETING;20120601 //-------->row 1
CUST_ID;20120602 //----------->row 2
using the tFileInputFullRow and tJavaRow I am parsing each row,splitting each row and assigning them to two context variables(at a time for each row).These context variables are then used in a mysql query.So what happens here now is that while using a tLogRow after the tMysqlInput the query using the last row of the input file is only outputed.I want each output of the query using each row from the input text file.
any suggestions??
1 REPLY
Community Manager

Re: need each Dynamic query output from tMysqlInput

Hi
Using tFlowToIterate to iterate each row, for example:
tFileInputFullRow--(main)row1--tJavaRow--(main)row2--tFlowToIterate--iterate--tMysqlInput--main--tLogRow:
on tMysqlInput, define a dynamic query like this:
"select * from tablename where name='"+(String)globalMap.get("row2.name")+"'"
----------------------------------------------------------
Talend | Data Agility for Modern Business