Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

SQL Context in SPARK SQL of Apache version 1.6.0

Highlighted

SQL Context in SPARK SQL of Apache version 1.6.0

Explorer
 
2 REPLIES 2

Re: SQL Context in SPARK SQL of Apache version 1.6.0

Community Manager

@rajesh1972 Can you provide some additional details on what information you are looking for? 



Cy Jervis, Community Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:
Community Guidelines
How to use the forum
Highlighted

Re: SQL Context in SPARK SQL of Apache version 1.6.0

Explorer

HI

 

I would like to create The data frame from the Jason. I already given my code . Once I am trying to compile in eclipse . I am not getting SQL context.

I am getting error on 

import org.apache.spark.sql.SQLContext

also I tried below also 

val sqlCtx = new org.apache.spark.sql.SQLContext(sc) but getting error in Eclipse .

 

I had given below maven dependency in Pom.XML

<!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core -->



<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.6.0</version>
</dependency>

<!-- add dependency of the Spark SQL components also -->
<!-- https://mvnrepository.com/artifact/org.apache.spark/spark-sql -->
<!-- https://mvnrepository.com/artifact/org.apache.spark/spark-sql -->
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>1.6.0</version>
</dependency>



<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.8</version>
</dependency>

Don't have an account?
Coming from Hortonworks? Activate your account here