drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitalii Diravka (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-6145) Implement Hive MapR-DB JSON handler.
Date Thu, 08 Feb 2018 14:25:00 GMT
Vitalii Diravka created DRILL-6145:

             Summary: 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
             Fix For: 1.13.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:
_> mapr dbshell_

_maprdb root:> create /tmp/table/json_  (make sure /tmp/table exists)
-- insert data
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"}'

 #  Create a Hive external table:
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");
 #  Use hive schema to query this table:
select * from hive.mapr_db_json_hive_tbl;

This message was sent by Atlassian JIRA

View raw message