Sql context is pre-defimed as sqlc, you may use that.
Cheers!

On 2015년 3월 6일 (금) 02:54 VISHNU SUBRAMANIAN <johnfedrickena...@gmail.com>
wrote:

> Hi,
>
> I am trying to use zeppelin. I executed the below commands.
>
> *import org.apache.spark.sql.SQLContext*
> *val rawData = sc.textFile("12345.txt")*
> *    val sqlContext = new SQLContext(sc)*
> *    val recordsJson = sqlContext.jsonRDD(rawData)*
> *    recordsJson.registerTempTable("records")*
> *%sql select tz from records*
>
> I get the below error when i put the above code in one paragraph.
>
> *<console>:36: error: not found: value % %sql select tz from records*
>
> I get the below error when I have the last line in a different paragraph.
>
> *%sql select tz from records*
> *Table Not Found: records*
>
> I am using the latest version built against spark-1.2
>
> Can some one help me to find what I am missing?
>
> Thanks,
> Vishnu
>

Reply via email to