Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3951

Lexical Errors in ODBC Queries

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Resolved
    • Affects Version/s: 1.1.0, 1.2.0
    • Fix Version/s: None
    • Component/s: Client - ODBC
    • Labels:
      None
    • Environment:

      Mac OS 10.11, Apache Drill v. 1.2, Python 3.4,

      Description

      I followed the instructions to install the latest version of Apache Drill, and the Mapr ODBC drivers, but when I attempt to query a data source via ODBC, I get the following errors:

      Error: ('HY000', '[HY000] [MapR][Drill] (1040) Drill failed to execute the query: ����������������`\n[30027]Query execution error. Details:[ \nPARSE ERROR: Lexical error at line 1, column 1. Encountered: "
      ufffd" (65533), after : ""\n\n\n[Error Id: 8e1f4049-f3e9-477f-9e3f-5df62c (1040) (SQLExecDirectW)')

      Here is the code which generates the errors:

      import pyodbc
      import pandas as pd
      MY_DSN = "DRIVER=/opt/mapr/drillodbc/lib/universal/libmaprdrillodbc.dylib;Host=localhost;Port=31010;ConnectionType=Direct;Catalog=Drill;Schema=mfs.views;AuthenticationType=No Authentication"
      conn = pyodbc.connect(MY_DSN, autocommit=True)
      cursor = conn.cursor()

      employee_query = "SELECT * FROM dfs.`employee.json`"
      data = pd.read_sql( employee_query, conn )

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cgivre Charles Givre
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: