Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Run MySQL query and use the Output as a datasource in tMap

Hello everybody,

 

I have a general question. I'm new to Talend and searching for a better solution then mine. I'm using the results of an very complex mySQL query as a datasoruce to create a new table (several datasources are involved for the final table). Right know I'm running the query on mysql workbench, store the data in a table and use that table as a Datasource in my talend job. So a detour.... 

It would be better to run the query directly in my talend job. Because right know I have to update my datasource tables first (run the queries inside my workbench) for using them in my talend job. Otherwise the data for the final table aren't up-to-date.

Maybe I overlooked somthing, but I didn't find a solution with google. I know it's possible to run a query with tMysqlRow. I've done it already. But I didn't get any results to use them in tMap. Is there a way with talend?

 

Cheers,

Christian

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Just put your query into a tMySQLInput component, make sure your schema aligns with your select clause columns and wrap the whole thing in double quotes (since it will be treated as a Java String before it is sent to MySQL). Your SQL queries can be as complicated as you like in Talend and they will work inside t{DB}Input components.

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Just put your query into a tMySQLInput component, make sure your schema aligns with your select clause columns and wrap the whole thing in double quotes (since it will be treated as a Java String before it is sent to MySQL). Your SQL queries can be as complicated as you like in Talend and they will work inside t{DB}Input components.