8

In the "Zeppelin tutorial" notebook, I can't use the %sql interpreter. It will output "sql interpreter not found". But the spark commands work fine, as well as %md and %sh.

Here's the log :

ERROR [2015-10-20 10:13:35,045] ({qtp885851948-51} NotebookServer.java[runParagraph]:615) - Exception from run org.apache.zeppelin.interpreter.InterpreterException: sql interpreter not found at org.apache.zeppelin.notebook.NoteInterpreterLoader.get(NoteInterpreterLoader.java:148) at org.apache.zeppelin.notebook.Note.run(Note.java:282) at org.apache.zeppelin.socket.NotebookServer.runParagraph(NotebookServer.java:613) at org.apache.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:126) at org.apache.zeppelin.socket.NotebookSocket.onMessage(NotebookSocket.java:56) at org.eclipse.jetty.websocket.WebSocketConnectionRFC6455$WSFrameHandler.onFrame(WebSocketConnectionRFC6455.java:835) at org.eclipse.jetty.websocket.WebSocketParserRFC6455.parseNext(WebSocketParserRFC6455.java:349) at org.eclipse.jetty.websocket.WebSocketConnectionRFC6455.handle(WebSocketConnectionRFC6455.java:225) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:745)

thomas legrand
  • 493
  • 1
  • 5
  • 16

2 Answers2

10

I had the same error. The problem was that the spark interpreter was deselected. At the top of the tutorial page, open the gear icon and make sure "spark %spark..." is blue and click save.

The UI is a bit confusing here. All interpreters are selected (blue) by default. You just have to click "save"

Merlijn Sebrechts
  • 545
  • 1
  • 5
  • 16
  • 4
    Rather confusing fact about the Zeppelin tutorial. The first thing you see is: "Bind interpreter for this note. Click to Bind/Unbind interpreter. Drag and drop to reorder interpreters. The first interpreter on the list becomes default. To create/remove interpreters, go to Interpreter menu." So I kind of naturally clicked on the Spark interpreter - which then causes this problem... – fnl Dec 07 '15 at 12:34
  • I'm glad I'm not the only one following that logic :) – Merlijn Sebrechts Dec 07 '15 at 13:24
  • 1
    Terrible UX, I had identified that the Spark interpretter needed to be turned on, but until I read this I thought that was what I had just done, when in fact I turned it off! Thanks for saving me hours of head scratching. – Joseph Rogers Jan 29 '19 at 15:39
4

Just add %spark to the "Load Data Into Table"

%spark
import org.apache.commons.io.IOUtils

after that replace %sql with %spark.sql in your queries.

It will work.

Also, ensure that Spark and md in the interpreters are selected(blue means selected) and click on save.

Bartosz Konieczny
  • 1,985
  • 12
  • 27
Sourabh Jain
  • 628
  • 6
  • 20