Set Output Format in Notebooks

Oracle Machine Learning Notebooks allow you to preformat query output in notebooks.

To preformat query output, you must use the command SET SQLFORMAT as follows:
  1. Open a notebook in Oracle Machine Learning.
  2. Type the command:
    %script
    SET SQLFORMAT format_option
    For example, if you want the output in ansiconsole format, then type the command followed by the SQL query as:
    SET SQLFORMAT ansiconsole;
    SELECT * FROM HR.EMPLOYEES;
    Here, the output format is ansiconsole, and the table name is HR.EMPLOYEES.

    Note:

    This formatting is available for the Script interpreter. Therefore, you must add the prefix %script as shown in this example.