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

Query used to derive result set metadata for Tableau's "Custom SQL" does not run

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 0.4.0
    • Execution - Flow

    Description

      The following style of query is used by Tableau to derive the metadata of a custom SQL:

      From Tableau's protocol server log:

      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: ODBCProtocol::ReadMetadataImpl: Attempting to read metadata from the prepared / executed query result set.
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: ODBCProtocolImpl::ReadMetadataImpl: Reading metadata using a prepared statement.
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: <QUERY protocol='0367b1f0'>
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: SELECT *
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: FROM (
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0:   select * from dfs.`default`.`/opt/drill/raw-files/click1.json`
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: ) `TableauSQL`
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: WHERE (0 = 1)
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: </QUERY>
      2014-05-30 18:35:39.718 (-,-,-,-) 0ea0: ODBCProtocolImpl::ReadMetadataImpl: SQLPrepare failed. Reading metadata using an executed query.
      2014-05-30 18:35:47.640 (-,-,-,-) 0ea0: ODBCProtocolImpl::ReadMetadataImpl: No columns were reported!
      

      Extracting the query to run inside sqlline shows the problem:

       
      0: jdbc:drill:zk=localhost:5181> select * from (select * from dfs.`default`.`/opt/drill/raw-files/click1.json`) `TableauSQL` where (0=1);
      +--+ 
      | | 
      +--+ 
      +--+ 
      No rows selected (9.059 seconds) 
      

      Attachments

        1. DRILL-884.patch
          60 kB
          Steven Phillips

        Issue Links

          Activity

            People

              Unassigned Unassigned
              overcoil George Chow
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: