Four Stars

Microsoft SQL to Mysql data insertion based on query results

HI,

 

newbie  in talend.

Working on : Talend Open Studio for Data Integration ,Version: 6.4.0

 

My Requirement:

1. I have MSSQL query with gets the result from 4 tables

2. I have a Mysql table with has same columns the resulted query column values should be inserted in Mysql table

 

* I had connected to the DB of Mssql and Mysql

* Please find the attached screenshot.

map.png

* Please guide me as how to insert the Query resulted values frm MSSQL to Mysql table.

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Nine Stars

Re: Microsoft SQL to Mysql data insertion based on query results

for Source (Input) components, it is not important - how many tables in Your query - from Talend side, any complicated SQL query look like single table

 

all what You need (must) - define columns schema for input component - exactly same as query return, that all. After this You can map it to Output column - make transformations and etc

-----------
10 REPLIES
Seven Stars

Re: Microsoft SQL to Mysql data insertion based on query results

Hi,

 

You simply want to load from mssql to mysql.

And All the columns also same?

Seven Stars

Re: Microsoft SQL to Mysql data insertion based on query results

can you say what are the issues you are facing?
Seven Stars

Re: Microsoft SQL to Mysql data insertion based on query results

I guess you have missed commit component in your job.please try with tmysqlcommit component with trigger(ONComponentOK)
Four Stars

Re: Microsoft SQL to Mysql data insertion based on query results

 

by googling i just mapped with tmap and did .

Please let me know the correct process of mapping.

*My executed Query columns and mysql table columns are same.

 

 

query.pngmaps.png

Seven Stars

Re: Microsoft SQL to Mysql data insertion based on query results

Hi Rohit,

 

In MSSQLinput schema is in BuiltIn use Repository and choose your table metadata and you will get all the columns as you expected.

Ten Stars

Re: Microsoft SQL to Mysql data insertion based on query results

See those lines in your tMap configuration? Those indicate that values on the left are mapped to values on the right. There aren't many lines in your tMap because the expression values for the columns in your output are empty. FK_ItemID appears to be set up correctly. Try modeling the other expressions after that one.
Four Stars

Re: Microsoft SQL to Mysql data insertion based on query results

While mapping : Query executed columns are not showing

 

i had kept Query type as repositoryrepository.png

Seven Stars

Re: Microsoft SQL to Mysql data insertion based on query results

Repositoryimg.PNGtmap_img.PNG

Four Stars

Re: Microsoft SQL to Mysql data insertion based on query results

Here you are querying from one table : persons  for single table its mapping

 

 

but my query with multiple tables . in this case how to map

Nine Stars

Re: Microsoft SQL to Mysql data insertion based on query results

for Source (Input) components, it is not important - how many tables in Your query - from Talend side, any complicated SQL query look like single table

 

all what You need (must) - define columns schema for input component - exactly same as query return, that all. After this You can map it to Output column - make transformations and etc

-----------