drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinfeng Ni (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-604) INFORMATION_SCHEMA.SCHEMATA needs to expose the schema type
Date Tue, 13 May 2014 20:53:15 GMT

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

Jinfeng Ni updated DRILL-604:
-----------------------------

    Attachment: DRILL-604.1.patch

> INFORMATION_SCHEMA.SCHEMATA needs to expose the schema type
> -----------------------------------------------------------
>
>                 Key: DRILL-604
>                 URL: https://issues.apache.org/jira/browse/DRILL-604
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: George Chow
>            Assignee: Jinfeng Ni
>            Priority: Minor
>         Attachments: DRILL-604.1.patch
>
>
> INFORMATION_SCHEMA.SCHEMATA looks like this currently:
> 0: jdbc:drill:schema=hivetg> select * from INFORMATION_SCHEMA.SCHEMATA;
> +--------------+-------------+--------------+
> | CATALOG_NAME | SCHEMA_NAME | SCHEMA_OWNER |
> +--------------+-------------+--------------+
> | DRILL        | hivestg.default | <owner>      |
> | DRILL        | hivestg     | <owner>      |
> | DRILL        | dfs.default | <owner>      |
> | DRILL        | dfs         | <owner>      |
> | DRILL        | cp.default  | <owner>      |
> | DRILL        | cp          | <owner>      |
> | DRILL        | INFORMATION_SCHEMA | <owner>      |
> +--------------+-------------+--------------+
> 0: jdbc:drill:schema=hivetg> describe INFORMATION_SCHEMA.SCHEMATA;
> +-------------+------------+-------------+
> | COLUMN_NAME | DATA_TYPE  | IS_NULLABLE |
> +-------------+------------+-------------+
> | CATALOG_NAME | VARCHAR    | NO          |
> | SCHEMA_NAME | VARCHAR    | NO          |
> | SCHEMA_OWNER | VARCHAR    | NO          |
> +-------------+------------+-------------+
> 3 rows selected (0.702 seconds)
> The ODBC driver needs to get at the schema type from storage-plugins.json to enable the
driver to determine how to operate with each schema (e.g., type "file" requires SHOW FILES;
"hive" can be used verbatim)
> For example, here's the default storage-plugins.json. Here "dfs" is tagged as of type
"file" and "hive" is tagged as "hive".
> {
>   "storage":{
>     dfs: {
>       type: "file",
>       connection: "file:///",
>       formats: {
>         "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"
>         }
>       }
>     },
>     cp: {
>       type: "file",
>       connection: "classpath:///"
>     },
>     hivestg : {
>         type:"hive",
>         config :
>           {
>             "hive.metastore.uris" : "thrift://192.168.39.33:9083",
>             "hive.metastore.sasl.enabled" : "false"
>           }
>     }
>     /*,
>     hive : {
>         type:"hive",
>         config :
>           {
>             "hive.metastore.uris" : "",
>             "javax.jdo.option.ConnectionURL" : "jdbc:derby:;databaseName=../../sample-data/drill_hive_db;create=true",
>             "hive.metastore.warehouse.dir" : "/tmp/drill_hive_wh",
>             "fs.default.name" : "file:///",
>             "hive.metastore.sasl.enabled" : "false"
>           }
>       }
>       */
>   }
> }
> A new column (name "type") added onto SCHEMATA would be sufficient.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message