Reputation: 55
I am extracting the filename from tfilelist and i am checking against the database if that filename exists in the table and display the corresponding output? I cannot see the output when i tried with both tlogrow and tjavarow component after tbdrow/tbinput.
Not sure what i am missing,and also i would want to store the filename and do a check if it exists print a message such as "file exists" and how do i do the IF condition after displaying the output?
I am just iterating from tbdinput to tbdrow to see which one works best,i feel its redundant since both the components can be used to query the db and return the results?Which one is better to use even though for faster results?
Tlogrow2&3 still displaying null value even though tlogrow shows the filename ,how to print the results from the database query onto the console and perform filexists check after that?please help
Upvotes: 0
Views: 5491
Reputation: 31
Use globalMap
to get the value:
System.out.println("Query is: " + ((String)globalMap.get("tDBInput_1_QUERY")))
For some reason, you always have to use 2 opening and closing parentheses when getting the value. Also, if you have renamed your component, you still need to use the name that Talend assigns it when you add it to your job, IE: tDBInput_x
Upvotes: 3