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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ashok200792
Contributor
Contributor

How to passing parameter to tMysqlinput through LOOK UP in tMap?

How to pass the parameter to tMysqIinput , through LOOK UP0683p000009LroX.png

 

 

QUERY:

 

"SELECT * FROM temp_salesorder_list where salesorderNo='"+(String)globalMap.get("OD_DB.salesorderNo"))+"'"

 

But result is Return 0 Rows. How we solve this Issue.,

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

You have to give the globalMap key a name (a String value) and then use that value in your temp_salesorder_list query. You should not need the tJavaFlex. I only used that in the tutorial to create some extra rows. 

 

As an example, your query would look similar to below if the globalMap key is called "myValue" and is a String.....

 

"Select myvalue1,
myvalue2,
myvalue3
FROM myTable
WHERE myValue4 = '" + ((String)globalMap.get("myValue"))+"'"

View solution in original post

12 Replies
Anonymous
Not applicable

This tutorial shows precisely how this is done. Instead of passing the Main row value to a DB component, it supplies it to a tJavaFlex. Apart from that, it is precisely what you want.

 

https://www.rilhia.com/quicktips/quick-tip-row-multiplication

Ashok200792
Contributor
Contributor
Author

 

We need to check the Database value based on the dynamic data in where condition on each row of the CSV file row based data , 

 

But we check the data static in that condition but the data is passed on the next flow ,

 

I try query simple in other job

 

"SELECT * FROM temp_salesorder_list where salesorderNo='5100408706'"0683p000009Lrmh.png

 

 

 

at the same time we need to validation on the CSV file on the another JOB, its not filtered that record static also we need to filter based on the each row in the DataBase dynamically by using LOOK UP, we try that example its not filter that record,

0683p000009Lrmr.png0683p000009LrjQ.png

 

 

 

 

 

 

 

 

Same query I run here static value but return "1 rows".

"SELECT * FROM temp_salesorder_list where salesorderNo='5100408706'"

 

SAMPLE INPUT FILE:

1005|56776|0000000721|5100408706|20171021|

 

Data is not filter into the given condition,

 

How to get dynamically check in the data in DataBase in CSV data file?? 

 

Can we given the any solution for this? Or any Alternative solution for check the data in Database(Mysql)??

Anonymous
Not applicable

I believe the tutorial I posted answers this. You need to have the tMap Lookup reload at each row to supply a different WHERE clause. Try out the solution in the tutorial

Ashok200792
Contributor
Contributor
Author

We tried that but data is not filtered , same thing happened i get record based on the where clause its not work?
Anonymous
Not applicable

You will need to take a screenshot of your tMap configuration so I can figure out what is going wrong

Ashok200792
Contributor
Contributor
Author

I have attached the tMap join,0683p000009Lrjy.png

 

 

 

Ashok200792
Contributor
Contributor
Author

when we try to check the database without where condition,
QUERY: "SELECT * FROM temp_salesorder_list"
job is freeze "Starting" only came from the LOOK UP , so that's why we tried to passed the parameters to check the data in database.


Any alternative solution for check the database data match to CSV data without freeze the Job???
Ashok200792
Contributor
Contributor
Author

Start the job after long time we get ERROR ,

 

Starting job FileProcess_Copy1 at 10:50 24/11/2017.

[statistics] connecting to socket on port 3666
[statistics] connected
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
[statistics] disconnected
at com.mysql.jdbc.SingleByteCharsetConverter.toString(SingleByteCharsetConverter.java:325)
at com.mysql.jdbc.ResultSetRow.getString(ResultSetRow.java:819)
at com.mysql.jdbc.ByteArrayRow.getString(ByteArrayRow.java:70)
at com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:5811)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5688)
at routines.system.JDBCUtil.getString(JDBCUtil.java:21)
at local_project.fileprocess_copy1_0_1.FileProcess_Copy1.tMysqlInput_2Process(FileProcess_Copy1.java:14811)
at local_project.fileprocess_copy1_0_1.FileProcess_Copy1.tFileInputDelimited_1Process(FileProcess_Copy1.java:3644)
at local_project.fileprocess_copy1_0_1.FileProcess_Copy1.tFileList_1Process(FileProcess_Copy1.java:12905)
at local_project.fileprocess_copy1_0_1.FileProcess_Copy1.tMysqlConnection_1Process(FileProcess_Copy1.java:13144)
at local_project.fileprocess_copy1_0_1.FileProcess_Copy1.runJobInTOS(FileProcess_Copy1.java:15225)
at local_project.fileprocess_copy1_0_1.FileProcess_Copy1.main(FileProcess_Copy1.java:15060)
Job FileProcess_Copy1 ended at 10:58 24/11/2017. [exit code=1]

 

 

Anonymous
Not applicable

You did not follow the tutorial. Look for the globalMap key which is circled in the diagram in blue. Then look at the map key which is circled in orange. This is the most important part of the tutorial.