Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My scenario is: XXXXX -> tmap -> tmysqlrow. The output of tmap is row1(Main) which has two columns column1 and column2, now I want to insert column1 and column 2 as well as the curdate() into table1 in my database. How can I achieve it?
insert into table1(column1, column 2, date) values(select column1, column 2 from '"+row1.????+"', curdate());
What should I change? Thanks!
cterenzi wrote:
There doesn't seem to be a reason to use tMysqlRow component here. You can create a global variable containing a datestamp at the start of your job using a tSetGlobalVar with value: TalendDate.getDate("yyyy-MM-dd")
Add a column containing your datestamp to your flow with your tMap and insert with tMysqlOutput.