[ 
https://issues.apache.org/jira/browse/DRILL-6145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16393718#comment-16393718
 ] 

ASF GitHub Bot commented on DRILL-6145:
---------------------------------------

GitHub user vdiravka opened a pull request:

    https://github.com/apache/drill/pull/1158

    DRILL-6145: Implement Hive MapR-DB JSON handler

    @sohami, @vrozov Please review

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vdiravka/drill DRILL-6145

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/1158.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1158
    
----
commit c1c1495f44a633703d3a2ef306881ab673b85ad9
Author: Vitalii Diravka <vitalii.diravka@...>
Date:   2018-03-09T16:02:42Z

    DRILL-6145: Implement Hive MapR-DB JSON handler

----


> Implement Hive MapR-DB JSON handler. 
> -------------------------------------
>
>                 Key: DRILL-6145
>                 URL: https://issues.apache.org/jira/browse/DRILL-6145
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive, Storage - MapRDB
>    Affects Versions: 1.12.0
>            Reporter: Vitalii Diravka
>            Assignee: Vitalii Diravka
>            Priority: Major
>              Labels: doc-impacting
>             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)

Reply via email to