Notebooks for Materialized Views

A notebook is an interactive environment for creating a materialized view in a given schema. Additionally, you can:

  • Execute individual paragraphs
  • View a table of query results
  • Visualize results as a bar chart, pie chart, area chart, line chart, or a scatter chart.

With the Incorta Labs Notebook integration, you can use the Notebook interface to create and edit a Materialized View.

Note: Notebook Integration is an Incorta Labs feature that requires additional configuration in the CMC. See Notebook Add-on for the steps required in order to use notebooks to create and edit materialized views.

Create a Materialized View using a Notebook

To create a materialized view using a Notebook, follow these steps:

  1. For a given schema, select + New in the action bar.
  2. In the Add New menu, select Materialized View.
  3. In the Data Source dialog, select a Language: SQL or Python. The selected Language is the language that Notebook will export to the materialized view.
  4. In Script, select Edit in Notebook.
  5. In the Edit Notebook dialog, enter the execution code in the paragraph code section in at least one paragraph.
  6. Run the paragraph or the notebook (optional).
  7. Select Done to exit the Edit Notebook dialog.
  8. In the Data Source dialog, optionally select Add Property to configure specific Apache Spark properties for the materialized view.
  9. Select Save.

Edit a Materialized View using a Notebook

To create a materialized view using a Notebook for a given schema, follow these steps:

  1. Select the materialized view table in the Schema Designer to open the Schema Table Editor.
  2. Select the Table Data Source in the Summary section.
  3. In the Data Source dialog, in Script, select the textbox or open dialog icon.
  4. In the Edit Notebook dialog, enter the execution code in the paragraph code section.
  5. Run the paragraph or the notebook (optional). 
  6. Select Done to save your changes and exit the Edit Notebook dialog.
  7. Select Add Property in the Data Source dialog to configure specific Apache Spark properties for the materialized view (optional).
  8. Select Save.

When you save your changes in the Edit Notebook dialog, two events occur:

  • Incorta saves all the changes to the interactive notebook as a notebook file internally.
  • From the notebook, Incorta exports only the specified Language paragraphs to the materialized view.

Related Links
© Incorta, Inc. All Rights Reserved.