You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Tomas Hudik <xh...@gmail.com> on 2015/10/23 14:28:17 UTC

.spark.sql.AnalysisException: no such table ;

Hi there,
i was following Zeppelin tutorial and code following snippet:

%sql
select * from test_table

I got error:
org.apache.spark.sql.AnalysisException: no such table test_table; line 1
pos 14


test_table was created and registered (succesfully) one snippet above:
val df = sqlContext.load("com.databricks.spark.csv", Map("path" ->
"test_1000.csv","header"->"true"))
df.registerTempTable("test_table")

Any idea where is the problem?
The tutorial describes similar procedure but with sc.parallelize instead of
sqlContext.load.

thanks, Tomas
btw when I create scala request (e.g. df.select("FlightDate").show())
within the same snippet as the table was created - it is working.

Re: .spark.sql.AnalysisException: no such table ;

Posted by moon soo Lee <mo...@apache.org>.
It can happen when you creates manually sqlContext instead of using
Zeppelin provided one.

Could you make sure you didn't create sqlContext manually?

Thanks,
moon

On Fri, Oct 23, 2015 at 9:28 PM Tomas Hudik <xh...@gmail.com> wrote:

> Hi there,
> i was following Zeppelin tutorial and code following snippet:
>
> %sql
> select * from test_table
>
> I got error:
> org.apache.spark.sql.AnalysisException: no such table test_table; line 1
> pos 14
>
>
> test_table was created and registered (succesfully) one snippet above:
> val df = sqlContext.load("com.databricks.spark.csv", Map("path" ->
> "test_1000.csv","header"->"true"))
> df.registerTempTable("test_table")
>
> Any idea where is the problem?
> The tutorial describes similar procedure but with sc.parallelize instead
> of sqlContext.load.
>
> thanks, Tomas
> btw when I create scala request (e.g. df.select("FlightDate").show())
> within the same snippet as the table was created - it is working.
>