Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Hive Functions via ODBC Driver (QlikView)

Explorer

Hi,

I'm having some trouble executing function-based Hive queries in QlikView (ODBC connector parse error), and I'm looking to understand if the fault lies in the QV syntax, or if functions are simply not supported by the Hive ODBC driver.

Example...

The following works in Hive command line:

select distinct a_date, reverse(a_date) from a_table where a_date > '20151201';

The following fails in QV:

SQL SELECT 
	reverse("a_date")
FROM HIVE.a_db."a_table"
WHERE "a_date" > '20151201';

The QV and connector implementation is fine otherwise; substituting 'reverse' with 'max' executes happily.

Thanks,

J.

1 ACCEPTED SOLUTION

Explorer

This problem has been resolved. Errors were caused by QV syntax peculiarities. Details can be viewed in the QV Community post here.

Thanks!

View solution in original post

12 REPLIES 12

Hive cli - working

select distinct a_date, length(a_date)from a_table where a_date >'20151201';

beeline ?

If beeline works then it's QV issue. Please test

@Joanna Waligora

Explorer

It works in 'hive (a_db)>', but I also checked in beeline (i.e. without using ODBC driver).

@Joanna Waligora

Do you mean it works with beeline and jdbc? but not working with QV+ odbc?

@Joanna Waligora If QV + ODBC issue then please see this https://community.qlik.com/thread/142680

I would say , open a case with them

Explorer

Does confirmation of jdbc functionality conclusively exclude odbc driver as the culprit?

I read the QV community thread earlier, but since the item was unresolved, I started my own. Subsequently it occurred to me that QV folks won't be able to help me if it's a driver limitation.

@Joanna Waligora Do you have access to hortonworks support? or Are you a customer? I would suggest to open a ticket or in worse case , open a jira ticket to address this.

Explorer

Correct.

You'll need to use the ODBC Data Source Administrator tool to uncheck "Use Native Query" from your ODBC driver installation.

Explorer

Thanks. It's unchecked by default.

I played with that setting before; setting it to 'on' does cause my previously functional syntax to fail.

Right now (native unchecked), doing a select on [a_date] works, but Hive functions like reverse([a_date]) fail.

Mentor

@Joanna Waligora are you still having issues with this? Can you accept best answer or provide your own solution?

Explorer

The QV support team is currently investigating this problem. I will provide an update / closure once I receive their feedback.

Also, I want to correct my initial statement - max, and length functions work fine, but reverse, instr, and regexp_extract don't.

Explorer

This problem has been resolved. Errors were caused by QV syntax peculiarities. Details can be viewed in the QV Community post here.

Thanks!

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.