Access OML Notebooks

To perform Oracle Machine Learning tasks, you can access Oracle Machine Learning Notebooks from Autonomous Database

Access Oracle Machine Learning Notebooks

You can access Oracle Machine Learning Notebooks from Autonomous Database.

To access Oracle Machine Learning Notebooks from the Autonomous Database:

  1. Select your Autonomous Database instance and on the Autonomous Database details page click Database Actions.Database Actions
  2. On the Database Actions page, go to the Development section and click Oracle Machine Learning. The Oracle Machine Learning sign in page opens. Oracle Machine Learning
  3. On the Oracle Machine Learning sign in page, enter your username and password.
  4. Click Sign In.

This opens the Oracle Machine Learning user application.

Create a Notebook

A notebook is a web-based interface for data analysis, data discovery, data visualization and collaboration.

Whenever you create a notebook, it has an interpreter settings specification. The notebook contains an internal list of bindings that determines the order of the interpreter bindings. A notebook comprises paragraphs which is a notebook component where you can write SQL statements, run PL/SQL scripts, and run Python commands. A paragraph has an input section and an output section. In the input section, specify the interpreter to run along with the text. This information is sent to the interpreter to be executed. In the output section, the results of the interpreter are provided.
To create a notebook:
  1. In the Oracle Machine Learning home page, click Notebooks. The Notebooks page opens.
  2. In the Notebooks page, click Create.
    The Create Notebook window appears.
  3. In the Name field, provide a name for the notebook.
  4. In the Comments field, enter comments, if any.
  5. In the Connections field, select a connection in the drop-down list. By default, the Global Connection Group is assigned.
  6. Click OK.
Your notebook is created and it opens in the notebook editor. You can now use it to run SQL statements, run PL/SQL scripts, and run Python commands. To do so, specify any one of the following directives in the input section of the paragraph:
  • %sql - To call the SQL interpreter and run SQL statements
  • %script - To call PL/SQL interpreter and run PL/SQL scripts
  • %md - To call the Markdown interpreter and generate static html from Markdown plain text
  • %python - To call the Python interpreter run Python scripts

Edit Your Notebook

Upon creating a notebook, it opens automatically, presenting you with a single paragraph using the default %sql interpreter. You can change the interpreter by explicitly specifying one of %script, %python, %sql or %md

Set the context with a project with which your notebook is associated.
You can edit an existing notebook in your project. To edit an existing notebook:
  1. In Oracle Machine Learning home page, select the project in which your notebook is available.
  2. Go to the Oracle Machine Learning navigator, and select Notebooks. Alternatively, you can click the Notebooks quick link in the home page.
    In the right pane, all notebooks that are available in the project are listed.
  3. Click the notebook that you want to open and edit.
    The selected notebook opens in edit mode.
  4. In the edit mode, you can use the Oracle Machine Learning notebooks toolbar options to run code in paragraphs, for configuration settings, and display options.

    Figure 2-1 Notebook toolbar

    Notebook toolbar
    You can perform the following tasks:
    • Write code to fetch data
    • Click run to run one or all paragraphs in the notebook.
    • Click show hide code to hide all codes from all the paragraphs in the notebook. Click it again to display the codes.
    • Click show hide output to hide all outputs from all the paragraphs in the notebook. Click it again to view the outputs.
    • Click clear output to remove all outputs from all the paragraphs in the notebook. To view the output, click the run icon again.
    • Click clear notebook to delete all the paragraphs in the notebook.
    • Click export notebookto export the notebook.
    • Click search code to search any information in the codes present in the notebook.
    • Click keyboard shortcuts to view the list of keyboard shortcuts.
    • Click interpreter bindings to set the order for interpreter bindings for the notebook.
    • Click notebook display options to select one of the three notebook display options.
      • Click default to view the codes, output, and metadata in all paragraphs in the notebook.
      • Click Simple to view only the code and output in all paragraphs in the notebook. In this view, the notebook toolbar and all edit options are hidden. You must hover your mouse to view the edit options.
      • Click Report to view only the output in all paragraphs in the notebook.
    • Click edit options to access paragraph specific edit options such as clear output, remove paragraph, adjust width, font size, run all paragraphs above or below the selected paragraph and so on.
    • Add dynamic forms such as the Text Input form, Select form, Check box form for easy selection of inputs and easy filtering of data in your notebook. Oracle Machine Learning supports the following Apache Zeppelin dynamic forms:
      • Text Input form — Allows you to create a simple form for text input.

      • Select form — Allows you to create a form containing a range of values that the user can select.

      • Check Box form — Allows you to insert check boxes for multiple selection of inputs.

    Note:

    The Apache Zeppelin dynamic forms are supported only on SQL interpreter notebooks.
  5. Once you have finished editing the notebook, click Back.
    This takes you back to the Notebook page.