Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive Functions via ODBC Driver (QlikView)

avatar
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

avatar
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

avatar
Master Mentor

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

avatar
Explorer

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

avatar
Master Mentor
@Joanna Waligora

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

avatar
Master Mentor

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

I would say , open a case with them

avatar
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.

avatar
Master Mentor

@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.

avatar
Explorer

Correct.

avatar

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

avatar
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.