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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Return results from HIVE query (not select statements)

Hello,

 

I'm using the tHiveRow component to execute a simple HIVE query to show the list of tables within a HIVE database. How would I return the query result that I would normally be able to see in the HIVE CLI so I can use it with other component.

 

Thanks

Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hello,

When you use tHiveRow or t<DB>Row, you'd better create job as follows.

tHiveRow-->tParseRecordSet-->tLogRow

Add a column in tHiveRow and select "Object" data type.
Check Advanced settings-> "Propagate QUERY's recordset" and select the object column.
Retrieve state and name in tParseRecordSet(Set "state" and "name" in Value).

Let us know if it works for you.

Best regards

Sabrina

Anonymous
Not applicable
Author

@xdshi

I am working on a similar problem. And i didnt understand, the below line

Retrieve state and name in tParseRecordSet(Set "state" and "name" in Value).

 

Could you please explain (or) give an example on how to set the values in tParseRecordSet. 

 

So, I added a new component "tParseRecordSet" and choose "final_query" (i.e. this is the column, which has has a list of list of queries, i.e. which was an output from tJavaRow) for Prev.Comp.Column List drop-down.

 

And under Attribute table, i added as below..

 

Column: col_1

Value : "col_1_value"

 

And i see error as below.. 

Exception in component tParseRecordSet_1

java.lang.ClassCastException: java.lang.String cannot be cast to java.sql.ResultSet

 

Could you please let me know, how to fix this. 

Anonymous
Not applicable
Author

@xdshi

Please let me know