Hive / HCatalog Forum

Hive ODBC error message

  • #39430
    Swooshx Wu
    Participant

    I got the following error message when I tried to export a table from SQL 2012 to Hive in the HDP sandbox.
    [ODBC Destination [2]] Error: Open Database Connectivity (ODBC) error occurred. SQLExecute returned error while inserting row 1
    [ODBC Destination [2]] Error: Open Database Connectivity (ODBC) error occurred. state: ‘HY000′. Native Error Code: 35. [Hortonworks][Hardy] (35) Error from Hive: error code: ‘40000’ error message: ‘Error while processing statement: FAILED: ParseException line 1:12 mismatched input ‘”default”‘ expecting TABLE near ‘INTO’ in insert clause’.
    My environment is Windows 2008 R2 + HortonworksHiveODBC32.msi + MS SQL server 2012 with SSIS
    Does anyone know what’s going on?
    I can provide more details and just tell me how to collect more debug information. Thanks.

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #39555
    Yi Zhang
    Moderator

    Hi Swooshx,

    Can you give detailed steps of how your are exporting data from mssql to hive? is the odbc driver set to use hiveserver2 or hiveserver1?

    Thanks,
    Yi

    #39627
    Swooshx Wu
    Participant

    Hi, Yi,
    I used Microsoft SSIS to do the import.
    The source is “OLE DB” and the destination is “ODBC Destination”
    I configured “hiveserver2″ in the System DSN in the ODBC setup.
    May I know the difference between “hiverserver1″ and “hiverserver2″?
    Thanks for your help.

    #39967
    Yi Zhang
    Moderator

    Hi Swoosh,

    Hiveserver2 is the new generation to replace hiveserver2, with improved features. The driver is for sql queries. For data import from traditional database to hadoop (including hive), consider use Sqoop.

    Thanks,
    Yi

    #40792
    Swooshx Wu
    Participant

    Hi, Yi,

    Thanks for your advice.
    I knew and I had tried the Sqoop before, it worked.
    But I just want to do all data operation from MS SQL through the ODBC driver.
    It seemed, I could transfer data from Hive to MS SQL through ODBC driver but could not write data back to the Hive through ODBC driver.
    I am not sure is this a bug or the limitation in the Hive ODBC driver.

    Cheers,
    Swooshx

    #41122
    Yi Zhang
    Moderator

    Hi Swooshx,

    It may be a limitation. How are you importing data into hive, the error message suggests you were using insert into xxx?

    Thanks,
    Yi

    #60532
    Masoud
    Participant

    I have the same problem. I used simba, and hortonworks ODBC driver but whenever try to see the data in Excel it fails with “ParseException line 2:17 cannot recognize input near ‘.’ ‘sample_07′ in table source.

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

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.