chetandb commented on a change in pull request #3296: [CARBONDATA-3443] Update 
hive guide with Read from hive
URL: https://github.com/apache/carbondata/pull/3296#discussion_r295259308
 
 

 ##########
 File path: docs/hive-guide.md
 ##########
 @@ -99,4 +99,16 @@ select count(*) from hive_carbon;
 select * from hive_carbon order by id;
 ```
 
+### Query data from hive table in Spark-2.1
+
+```
+set hive.mapred.supports.subdirectories=true;
+set mapreduce.input.fileinputformat.input.dir.recursive=true;
+
+create table hive_carbon_1(id int, name string, scale decimal, country string, 
salary double) ROW FORMAT SERDE 'org.apache.carbondata.hive.CarbonHiveSerDe' 
WITH SERDEPROPERTIES 
('mapreduce.input.carboninputformat.databaseName'='default', 
'mapreduce.input.carboninputformat.tableName'='HIVE_CARBON_EXAMPLE') STORED AS 
INPUTFORMAT 'org.apache.carbondata.hive.MapredCarbonInputFormat' OUTPUTFORMAT 
'org.apache.carbondata.hive.MapredCarbonOutputFormat' LOCATION 
'location_to_the_carbon_table';
 
 Review comment:
   "Example" can be the heading for this query sequence

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to