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

Can tHiveinput run multiple queries

hello everyone, Can tHiveinput run multiple queries because we want to validate 2 result from 2 different tables, thanks in advance.

 

0683p000009M7Z9.jpg

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
Change the job like:
tHiveinput--main--tJavaRow1
_onsubjobok
tHiveinput2-main--tJavaRow2--runIf-->other components


View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hi
It is impossible to execute multiple queries on one tHiveInput, you can use two tHiveinput components to execute each query and store the result to context variable or global variable for used later. eg:
tHiveInput--main--tJavaRow
on tJavaRow:
context.date1=input_row.dateColumnName;

Hope it helps you!

Regards
Shong
Anonymous
Not applicable
Author

hello Shong , thanks for your response, so do i have to use 2 tHiveinput and 2 tJavarow ?

Anonymous
Not applicable
Author

hello , could you please clarify how can i get value , now both value are null value.

And in tJavarow i am writting 

context.reference = input_row.reference;
context.reference1 = input_row.reference1;
System.out.println(context.reference);
System.out.println(context.reference1);

Thanks!!

 

0683p000009M7l6.jpg

Anonymous
Not applicable
Author

Hi
Change the job like:
tHiveinput--main--tJavaRow1
_onsubjobok
tHiveinput2-main--tJavaRow2--runIf-->other components


Anonymous
Not applicable
Author

thanks Shong , this is correct and i have completed test, but i have to think if there are more than 5 queries need to be validated and execute in other situation , whether there is good method or not. Will post here once any update.