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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to pass variable to tMysqlInput?

Hi Talend Community,

 

I have a job that needs to do the following:

extract data variable from table -> Iterate row-> select new data set based on variable input.

Here is my current job

0683p000009Lt50.png

Here is my tMysqlInput_2 select:

"select  result from details where customerid ="+((String)globalMap.get("row1.customer"))

 

When I execute I get the following error

Exception in component tMysqlInput_2
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'AF214DS' in 'where clause'

It seems to be replacing the variable with the column name....

Labels (5)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Change the expression to build the SQL query, because value must be enclosed between '' :

"select  result from details where customerid = '"+((String)globalMap.get("row1.customer"))+"'"

View solution in original post

1 Reply
TRF
Champion II
Champion II

Change the expression to build the SQL query, because value must be enclosed between '' :

"select  result from details where customerid = '"+((String)globalMap.get("row1.customer"))+"'"