You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Pearcy (JIRA)" <ji...@apache.org> on 2015/01/26 07:03:34 UTC

[jira] [Updated] (DRILL-1545) Json files can only be read when they have a .json extension

     [ https://issues.apache.org/jira/browse/DRILL-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Pearcy updated DRILL-1545:
-------------------------------
    Attachment: DRILL-1545.3.patch.txt

I just tested this out and it did not work on compressed files due to an issue in that assumed any compressed files needed the extension stripped prior to evaluating. 

Attached is a patch off current master (5b2a11b7c1b35d78985dfc523fe616a095e95864) to fix. 

There's is no test coverage for BasicFormatMatcher, but is otherwise fine. 

> Json files can only be read when they have a .json extension
> ------------------------------------------------------------
>
>                 Key: DRILL-1545
>                 URL: https://issues.apache.org/jira/browse/DRILL-1545
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Jason Altekruse
>            Assignee: Jason Altekruse
>             Fix For: 0.8.0
>
>         Attachments: DRILL-1545.2.patch.txt, DRILL-1545.3.patch.txt
>
>
> It seems that Drill can only discover json data if the file extension is .json.   
> We have tried to add the file extension.log as type json in the Storage Plugin (and validated the json) , but without success. 
> Would be great if somebody can share a example config or has an idea.
> Storage Plugin Configuration.
> {
>   "type": "file",
>   "enabled": true,
>   "connection": "maprfs:///",
>   "workspaces": {
>     "root": {
>       "location": "/",
>       "writable": false,
>       "storageformat": null
>     },
>     "tmp": {
>       "location": "/tmp",
>       "writable": true,
>       "storageformat": "csv"
>     }
>   },
>   "formats": {
>     "log": {
>       "type": "json",
>       "extensions": [
>         "log"
>       ]
>     },
>     "psv": {
>       "type": "text",
>       "extensions": [
>         "tbl"
>       ],
>       "delimiter": "|"
>     },
>     "csv": {
>       "type": "text",
>       "extensions": [
>         "csv"
>       ],
>       "delimiter": ","
>     },
>     "tsv": {
>       "type": "text",
>       "extensions": [
>         "tsv"
>       ],
>       "delimiter": "\t"
>     },
>     "parquet": {
>       "type": "parquet"
>     },
>     "json": {
>       "type": "json"
> }
>   }
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)