- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Supported functions in Hive ODBC driver
Created 09-06-2022 01:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm looking for a list of supported ODBC functions in the HIVE ODBC driver..
I have a particular issue with { fn EXTRACT(YEAR FROM "datecolumn") } which is not recognised but a comprehensive list would be great.
Thanks
Created on 09-06-2022 04:16 AM - edited 09-06-2022 04:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Markyd ,
Functions used in Hive queries are usually passed to the Hive service as is. I don't think the ODBC driver does any particular processing or validation of those functions. At the end of the day it's a matter of whether the Hive version you're using supports that function or not, and this depends on the Hive version being used, not the driver version.
Here you can see a comprehensive list of Hive functions and the associated Hive version where they were introduced: https://cwiki.apache.org/confluence/display/hive/languagemanual+udf
Which version of Hive are you using?
Are you using the Cloudera ODBC Drivers for Hive? Which version?
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created 09-06-2022 10:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the info, that's very useful. It's Hive 3.1.2, Cloudera ODBC for Hive 2.6.1
Interestingly I get the following results querying though the ODBC driver (use native query = false)
SELECT extract (year FROM "datecolumn") -- accepted
SELECT { fn extract (year FROM "datecolumn") } -- ParseException
and yet
SELECT { fn year("datecolumn") } - accepted
So there may be an inconsistency in the way the driver parses the ODBC function syntax.
Mark
Created on 09-06-2022 04:16 AM - edited 09-06-2022 04:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Markyd ,
Functions used in Hive queries are usually passed to the Hive service as is. I don't think the ODBC driver does any particular processing or validation of those functions. At the end of the day it's a matter of whether the Hive version you're using supports that function or not, and this depends on the Hive version being used, not the driver version.
Here you can see a comprehensive list of Hive functions and the associated Hive version where they were introduced: https://cwiki.apache.org/confluence/display/hive/languagemanual+udf
Which version of Hive are you using?
Are you using the Cloudera ODBC Drivers for Hive? Which version?
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created 09-06-2022 10:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the info, that's very useful. It's Hive 3.1.2, Cloudera ODBC for Hive 2.6.1
Interestingly I get the following results querying though the ODBC driver (use native query = false)
SELECT extract (year FROM "datecolumn") -- accepted
SELECT { fn extract (year FROM "datecolumn") } -- ParseException
and yet
SELECT { fn year("datecolumn") } - accepted
So there may be an inconsistency in the way the driver parses the ODBC function syntax.
Mark
