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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
fjblau
Contributor
Contributor

Use JSON field in SQL Query

I have a field in my json that lists machine names.... I am able to extract that and it gives me the right values. I iterate on that output with

JSON ---Row2---> FlowToIterate -> DBinput - tLogRow

in the dbInput SQL Query I have:

"SELECT inspectionMachineName,

lastPrId

FROM inspectionMachine

where inspectionMachineName = "+(String)globalMap.get(\"row2.DbName\")

But I cannot get it to run and display the data from inspectionMachine table.

Any ideas?

Labels (2)
1 Reply
Anonymous
Not applicable

Hi

Before using the global variable in the query, print the value of (String)globalMap.get("row2.DbName") on a tJava to check whether it has the right value.

JSON ---Row2---> FlowToIterate -> tJava

 

on tJava:

System.out.println((String)globalMap.get("row2.DbName"));

 

Regards

Shong