write a insert query using a tMysqlRow component?

One Star

write a insert query using a tMysqlRow component?

Query: insert into employee values(name,id) on duplicate key update id=id+1
Job structure: 2 tmysqlInputs to a tMap , leading to a tMysqlRow component
What should be the format of the sql query.
One Star

Re: write a insert query using a tMysqlRow component?

any help here?
One Star

Re: write a insert query using a tMysqlRow component?

Let's say that the output from your tMap is call "out" and it has two fields/columns- one called v1 (for name column) and one called v2 (for id). The Query in your tMySQL would be:
"insert into employee values("+out.v1+","+out.v2+") on duplicate key update id=id+1"

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch