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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Moe1
Contributor II
Contributor II

Pass parameters from tmysql to tjava

Hi,

 

I need to read set of columns from a mysql table and pass their values to a function in java written inside tjava.

 

Thank you.

Labels (3)
2 Replies
fdenis
Master
Master

Ok, do it!
what are your problems

Anonymous
Not applicable

Use a tMySQLInput to retrieve your data. Connect this to a tFlowToIterate component. If you have 3 columns in your select called "name", "age", and "date_of_birth", and your row coming from your DB component is called "row1", you will get the following globalMap variables created (these are the keys)....

 

"row1.name"

"row1.age"

"row1.date_of_birth"

 

Connect your tJava to the tFlowToIterate using an iterate link. Then you can access the values from the keys shown above like below (assuming that "name" is a String, "age" is an Integer and "date_of_birth" is a Date)....

 

String nameVal = ((String)globalMap.get("row1.name"));
Integer ageVal = ((Integer)globalMap.get("row1.age"));
Date dobVal = ((Date)globalMap.get("row1.date_of_birth"));