Skip to main content

Interpreters overview

An interpreter is what actually runs the content of a paragraph. You choose one by starting the paragraph with a binding, written as %<name> (or %<group>.<name> when an interpreter has several variants). If a paragraph has no binding, it runs with the notebook's default interpreter.

%python
print("this paragraph runs in Python")

Which interpreters are actually available to you depends on how your Skeyenote instance is configured, and each one is configured with its own set of properties (connection URLs, credentials, resource limits, …) by an administrator from the interpreter settings screen. Ask your administrator if a binding you expect is missing, or if you need a property changed.

Available interpreters

InterpreterBindings
Markdown%md
Shell%sh, %sh.terminal
Python%python, %python.ipython, %python.sql, %python.conda, %python.docker
JDBC / SQL%jdbc
Java%java
Groovy%groovy
R%r, %r.ir, %r.shiny
Apache Spark%spark, %spark.sql, %spark.pyspark, %spark.ipyspark, %spark.r, %spark.ir, %spark.shiny
Spark Submit%spark-submit
HDFS files%file.hdfs
Neo4j%neo4j
Elixir%elixir
Bioinformatics%bio.fetch, %bio.sequence, %bio.align, %bio.visualize

The notebook context object (ssnc)

Every code interpreter exposes a shared object called ssnc, giving you a common set of helpers regardless of language.

Display rich output

%python
ssnc.show(my_dataframe)

Prompt for input with a dynamic form — the form is rendered above the paragraph, and the value is reused every time the paragraph runs:

%python
name = ssnc.textbox("name", "World")
threshold = ssnc.select("threshold", ["low", "medium", "high"])
print(f"Hello, {name}! Threshold: {threshold}")

Other form helpers include ssnc.input(...), ssnc.password(...), and ssnc.checkbox(...). Prefixing a helper with note (for example ssnc.noteTextbox(...)) scopes the form to the whole notebook instead of a single paragraph.

Chain paragraphs and notebooks

%python
ssnc.run("paragraph-id") # run one paragraph by id
ssnc.runAll() # run every paragraph in the current notebook
ssnc.runNote("note-id") # run another notebook