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

Can not make files with extension "log" to be recognized as json format?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.7.0
    • Component/s: Execution - Data Types
    • Labels:
      None
    • Environment:

      0.6R3

      Description

      If we want to use ".log" as the file extension, and also want it to be recognized as json format, I tried to use below storage engine , but failed to read the .log file..

        "formats": {
          "log": {
            "type": "json"
          },
          "csv": {
            "type": "text",
            "extensions": [
              "csv"
            ],
            "delimiter": ","
          }
        }
      
      0: jdbc:drill:zk=n1a:5181,n2a:5181,n3a:5181> select * from  logtest.`test.json`;
      +------------+------------+------------+------------+
      |   field1   |   field2   |   field3   |   field4   |
      +------------+------------+------------+------------+
      | data1      | 100.0      | more data1 | 123.001    |
      +------------+------------+------------+------------+
      1 row selected (0.159 seconds)
      0: jdbc:drill:zk=n1a:5181,n2a:5181,n3a:5181> select * from  logtest.`test.log`;
      Query failed: Failure while validating sql : org.eigenbase.util.EigenbaseContextException: From line 1, column 16 to line 1, column 22: Table 'logtest.test.log' not found
      
      Error: exception while executing query: Failure while executing query. (state=,code=0)
      

      Do we support above requirement?
      If so, what is the storage plugin text?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                haozhu Hao Zhu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: