5.10 About Interpreter Bindings and Notebooks
An interpreter is a plug-in that allows you to use a specific data processing language backend.
For the Zeppelin Notebooks in Oracle Machine Learning UI, you use the SQL, PL/SQL, Python and R interpreters within an Oracle Database interpreter group, and the Markdown interpreter for plain text formatting syntax so that it can be converted to HTML. You use the Conda interpreter to connect to the Conda environment and work with Python third-party library packages.
- SQL —
%sql
- PL/SQL —
%script
- Python —
%python
- R -
%r
- Markdown —
%md
- Conda —
%conda
- Low — Provides the least level of resources for in-database operations, typically serial (non-parallel) execution. It supports the maximum number of concurrent in-database operations by multiple users. The interpreter with low priority is listed at the top of the interpreter list, and hence, is the default.
- Medium — Provides a fixed number of CPUs to execute in-database operations in parallel, where possible. It supports a limited number of concurrent users, typically 1.25 times the number of CPUs allocated to the pluggable database.
- High — Provides the highest level of CPUs to execute in-database operations in parallel, up to the number of CPUs allocated to the pluggable database. It offers the highest performance, but supports the minimum number of concurrent in-database operations, typically 3.
- Bind and unbind interpreters: If you do not bind any specific interpreter to your notebook, then you get the error message:
Not supported interpreter <name of interpreter>
- Set and re-order interpreter bindings. You may want to set and re-order interpreter bindings if you want to use a specific interpreter for a specific paragraph in a notebook. In that case, you have to select the specific interpreter for that paragraph.
- Change the interpreter binding for any specific paragraph in a notebook
- Notebook creation — When you create a notebook, the notebook inherits the initial interpreter binding order, which is low (default), medium, high.
- Notebook import — When importing a notebook, the notebook inherits the defined interpreter bindings. However, after you import a notebook, ensure to check the order of the interpreter bindings and that the required interpreters are selected.
- Notebook export — When exporting a notebook, the notebook inherits the defined interpreter bindings.
- Notebook creation from templates — When you create a notebook from templates, the notebook inherits the default order of interpreter bindings.
- Change Interpreter Bindings for Specific Paragraphs in a Notebook
The interpreter binding order that is set for a notebook applies to all the paragraphs in that notebook. However, you can override the interpreter binding for SQL, PL/SQL, R, Python and Conda interpreters for any specific paragraph in the notebook. - Set Interpreter Bindings for Notebooks
You must bind a notebook to an interpreter to fetch data from the database or any data source. A default set of interpreter bindings is available. - Verify Interpreter Bindings
After setting and changing the order of interpreter bindings, you can verify the interpreter bindings whether you are using SQL, PL/SQL, R or Python interpreter in a given notebook. You use a SQL statement to view and verify the interpreter binding information about your notebook.
Parent topic: About Oracle Machine Learning Notebooks Classic
5.10.1 Change Interpreter Bindings for Specific Paragraphs in a Notebook
The interpreter binding order that is set for a notebook applies to all the paragraphs in that notebook. However, you can override the interpreter binding for SQL, PL/SQL, R, Python and Conda interpreters for any specific paragraph in the notebook.
- SQL —
%sql
- PL/SQL —
%script
- Python —
%python
- R -
%r
- Markdown —
%md
- Conda —
%conda
Note:
Do not override Python paragraph interpreter bindings as they will not share the same Python engine backend.Parent topic: About Interpreter Bindings and Notebooks
5.10.2 Set Interpreter Bindings for Notebooks
You must bind a notebook to an interpreter to fetch data from the database or any data source. A default set of interpreter bindings is available.
5.10.3 Verify Interpreter Bindings
After setting and changing the order of interpreter bindings, you can verify the interpreter bindings whether you are using SQL, PL/SQL, R or Python interpreter in a given notebook. You use a SQL statement to view and verify the interpreter binding information about your notebook.
Note:
For Python notebooks, do not override the interpreter binding at the paragraph level.Parent topic: About Interpreter Bindings and Notebooks