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:
- For a given schema, select + New in the action bar.
- In the Add New menu, select Materialized View.
- 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.
- In Script, select Edit in Notebook.
- In the Edit Notebook dialog, enter the execution code in the paragraph code section in at least one paragraph.
- Run the paragraph or the notebook (optional).
- Select Done to exit the Edit Notebook dialog.
- In the Data Source dialog, optionally select Add Property to configure specific Apache Spark properties for the materialized view.
- Select Save.
Edit a Materialized View using a Notebook
To create a materialized view using a Notebook for a given schema, follow these steps:
- Select the materialized view table in the Schema Designer to open the Schema Table Editor.
- Select the Table Data Source in the Summary section.
- In the Data Source dialog, in Script, select the textbox or open dialog icon.
- In the Edit Notebook dialog, enter the execution code in the paragraph code section.
- Run the paragraph or the notebook (optional).
- Select Done to save your changes and exit the Edit Notebook dialog.
- Select Add Property in the Data Source dialog to configure specific Apache Spark properties for the materialized view (optional).
- 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.