Hive ODBC query error

to create new topics or reply. | New User Registration

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Adnan Fiaz 1 year, 7 months ago.

  • Creator
    Topic
  • #45534

    Adnan Fiaz
    Member

    Hi, I am trying to execute a query using an ODBC connection to Hive within R (using the RODBC library). My connection to Hive seems to work fine, I have followed the instructions as mentioned in the ODBC driver installation documents. I also know it works fine because I have executed the following queries successfully:
    – show tables
    – describe table1
    – select * from table1

    The problem occurs when I try to retrieve a specific column from the table. In other words the query “select col1 from table1″ fails with the following error:
    HY000 35 [Hortonworks][Hardy] (35) Error from Hive: error code: ‘1’ error message: ‘Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask’.”
    [2] “[RODBC] ERROR: Could not SQLExecDirect ‘SELECT col1 FROM table1 LIMIT 10′

    Now I’m not sure if the problem lies with Hive, the ODBC driver or with R. Any thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hive ODBC query error’ is closed to new replies.

  • Author
    Replies
  • #45806

    Adnan Fiaz
    Member

    Thank you for the advice, never occurred to me to look in the logs. The logs showed a permission denied error. As specified in the installation instruction I configured the ODBC driver to log on as user hadoop but this user has no write access. I changed the user to hdfs and the query works. Thanks again!

    Collapse
    #45735

    Thejas Nair
    Participant

    The commands that worked for you don’t launch a map reduce job. It looks like there is a problem while launching map-reduce jobs. Can you check the hive logs (default location, assuming you are running hiveserver2 as user hive) – /tmp/hive/hive.log to see if it has the full error message ? If you see that MR job was launched, you can also use the job tracker UI to see why the job might have failed.

    Collapse
    #45535

    Adnan Fiaz
    Member

    FYI, I’ve tried playing around with quotation marks but no luck. Also tried to use table.col1 instead of just col1 but that didn’t work either.

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.