[
https://issues.apache.org/jira/browse/DRILL-6145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16526386#comment-16526386
]
Vitalii Diravka commented on DRILL-6145:
----------------------------------------
Hi [~bbevens]
The primary goal of user is to query Hive table, the type of which can be
MapR-DB JSON.
This handler is a MapR-Hive feature and it is similar to HBaseStorageHandler.
So better place for doc can be [1], which you have mentioned early.
Also it is better to indicate that Drill can just query such tables:
{quote}
The MapR Drill installation package includes a hive-maprdb-json-handler, which
enables you to query Hive MapR-DB JSON tables (regular and external) [2]. The
hive-maprdb-json-handler is not included in the Apache Drill installation
package
{quote}
Note with reference to the above doc can be added in [3]
1.
https://drill.apache.org/docs/hive-storage-plugin/#connect-drill-to-the-hive-remote-metastore
2. https://maprdocs.mapr.com/60/Hive/ConnectingToMapR-DB.html
3. https://drill.apache.org/docs/mapr-db-format/
> Enable usage of Hive MapR-DB JSON handler
> -----------------------------------------
>
> Key: DRILL-6145
> URL: https://issues.apache.org/jira/browse/DRILL-6145
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - Hive, Storage - MapRDB
> Affects Versions: 1.12.0
> Reporter: Vitalii Diravka
> Assignee: Vitalii Diravka
> Priority: Major
> Labels: doc-complete
> Fix For: 1.14.0
>
>
> Similar to "hive-hbase-storage-handler" to support querying MapR-DB Hive's
> external tables it is necessary to add "hive-maprdb-json-handler".
> Use case:
> # Create a table MapR-DB JSON table:
> {code}
> _> mapr dbshell_
> _maprdb root:> create /tmp/table/json_ (make sure /tmp/table exists)
> {code}
> -- insert data
> {code}
> insert /tmp/table/json --value '\{"_id":"movie0000002" , "title":"Developers
> on the Edge", "studio":"Command Line Studios"}'
> insert /tmp/table/json --id movie0000003 --value '\{"title":"The Golden
> Master", "studio":"All-Nighter"}'
> {code}
> # Create a Hive external table:
> {code}
> hive> CREATE EXTERNAL TABLE mapr_db_json_hive_tbl (
> > movie_id string, title string, studio string)
> > STORED BY 'org.apache.hadoop.hive.maprdb.json.MapRDBJsonStorageHandler'
> > TBLPROPERTIES("maprdb.table.name" =
> "/tmp/table/json","maprdb.column.id" = "movie_id");
> {code}
>
> # Use hive schema to query this table via Drill:
> {code}
> 0: jdbc:drill:> select * from hive.mapr_db_json_hive_tbl;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)