[ https://issues.apache.org/jira/browse/CARBONDATA-3915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kunal Kapoor resolved CARBONDATA-3915. -------------------------------------- Fix Version/s: 2.1.0 Resolution: Fixed > Correction in the documentation for spark-shell > ----------------------------------------------- > > Key: CARBONDATA-3915 > URL: https://issues.apache.org/jira/browse/CARBONDATA-3915 > Project: CarbonData > Issue Type: Bug > Components: hive-integration > Affects Versions: 2.0.0 > Environment: 3 node ANT cluster one track. > Reporter: Prasanna Ravichandran > Priority: Minor > Fix For: 2.1.0 > > Time Spent: 2h > Remaining Estimate: 0h > > Spark-Shell program is not working, which is given in the > [https://github.com/apache/carbondata/blob/master/docs/hive-guide.md] > > Working program is given as below: > import org.apache.spark.sql.SparkSession > import org.apache.spark.sql.CarbonSession._ > val newSpark = > SparkSession.builder().config(sc.getConf).enableHiveSupport.config("spark.sql.extensions","org.apache.spark.sql.CarbonExtensions").getOrCreate() > newSpark.sql("drop table if exists hive_carbon").show > newSpark.sql("create table hive_carbon(id int, name string, scale decimal, > country string, salary double) STORED AS carbondata").show > newSpark.sql("LOAD DATA INPATH > 'hdfs://hacluster/user/prasanna/samplehive.csv' INTO TABLE hive_carbon").show > newSpark.sql("SELECT * FROM hive_carbon").show() > so could update the above working program in the > [https://github.com/apache/carbondata/blob/master/docs/hive-guide.md] page, > under the "Start Spark shell by running the following command in the Spark > directory" section. > -- This message was sent by Atlassian Jira (v8.3.4#803005)