Reply
Contributor
Posts: 44
Registered: ‎09-14-2017

%table avg_trips_sorted SyntaxError: invalid syntax in Python run in Hue/spark

Hi, while running the python example on Hue->Query->Editor->Spark it gives a syntax error in the last line which has the %table . Any ideas? 

 

http://blog.cloudera.com/blog/2015/10/how-to-use-hues-notebook-app-with-sql-and-apache-spark-for-ana...

 

=================================================================

>>> Invoking Spark class now >>>

  File "/yarn/nm/usercache/userxyz/appcache/application_1509052489118_0187/container_1509052489118_0187_01_000002/bikeshare.py", line 22
    %table avg_trips_sorted
    ^
SyntaxError: invalid syntax

<<< Invocation of Spark command completed <<<

No child hadoop job is executed.
Intercepting System.exit(1)

<<< Invocation of Main class completed <<<

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SparkMain], exit code [1]

Oozie Launcher failed, finishing Hadoop job gracefully

 

Highlighted
Contributor
Posts: 44
Registered: ‎09-14-2017

Re: %table avg_trips_sorted SyntaxError: invalid syntax in Python run in Hue/spark

%table works only with pySpark after Livy is installed and running.

Announcements