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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Execute HQL Context variable in thiveinput

Hello,

Im trying to execute hql query from contextvariable in thiveinput

If my context variable has hard code values then its working fine.

If im reading another context variable the it throw error. 

Labels (2)
3 Replies
Anonymous
Not applicable
Author

For testing, print the value of context variable on the console to check if the context variable is assigned value correctly. If you can't still solve it, please upload a screenshot of job and show us the error.

Regards
Shong
Anonymous
Not applicable
Author

Hi,

 

Print result is good but not reading the other variables in query.

 

Here is my query in variable:

"select distinct XXXXXXXXXXXXX from +context.db_name+.+context.view_name"

 

Error:

tHiveInput_1 Error while compiling statement: FAILED: ParseException line 1:109 cannot recognize input near '+' 'context' '.' in join source
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:109 cannot recognize input near '+' 'context' '.' in join source


Error.PNG
Anonymous
Not applicable
Author

It's a compilation error, change the query to
"select distinct XXXXXXXXXXXXX from "+context.db_name+"."+context.view_name"