Custom Views are similar to tables and are generated using SQL “CREATE VIEW” statements, which provide for a great deal of flexibility in terms of the joins and groupings that can be used, as well as all the other SQL functionality and syntax that are available.
Note: When your Prepare instance uses Fabric storage, custom views are only accessible via the Lakehouse’s SQL endpoint and cannot be referenced from custom scripts, transformations, etc.
- Before deploying the view, ensure all referenced tables have been executed, otherwise, deployment will fail.
- Successfully deployed views can be previewed and their fields read directly.
Adding a Custom View
To add a custom view, follow the steps below.
- Expand the relevant data area, right-click Views and then click Add Custom View.
- In Name as in script box, type the name of the view, which must be the same as the name specified in the script, including the schema.

- Enter the create statement for the view using the standard SQL syntax. Drag tables, fields and variables from the list in the right-hand pane to use them as parameters. Fields entered as parameters can be mapped to the view's fields to enable documentation and data lineage - for more information see the section on Mapping Custom View Fields below.

- Click OK to save the view.
- Deploy the view
- Right-click the view and select Read View Fields.

- Expand the view to show the fields, and then right-click the view and select Preview View to double-check that the view is working properly.


Adding a Custom View Based on a Table
To add a custom view based on an existing table, drag the table to the Views node in a data area.

Editing a Custom View
In order to change the view:
- Right-click on the Custom View and select Edit Custom View
- Make the changes to the create statement and click OK
- Right-click on the Custom View and select Deploy
- Right-click on the Custom View and select Synchronize View Fields
Mapping Custom View Fields
Since a custom view is very flexible, the relationship between the parameterized 'input' fields and the view's fields cannot automatically be mapped. This means that documentation and visualizations, such as data lineage, cannot automatically trace a field from data source to destination if it passes through a custom view. However, documentation and data lineage through custom views can be achieved with some manual mapping.
To map the custom view's fields to the parameterized fields, follow the steps below.
- Make sure the fields have been read, then right-click the view and click Map Custom View Fields.

- Drag each field from the View fields list to one or more fields in the Parameter fields list to create mappings. To delete a mapping, click the mapping and then click Delete. Click Auto Map to map fields automatically based on name.

- Once all view fields have been mapped, click OK.
Notebook views (Fabric Lakehouse storage)
For Prepare instance on Fabric Lakehouse storage, a special type of view is available. Unlike the Fabric-flavor of custom views that are only accessible through the SQL endpoint and cannot be used in custom scripts or transformations, Notebook views work more like regular custom views.
To add a notebook view, follow the steps below.
- Expand the relevant data area, right-click Views and then click Add Notebok View.
- In the script area, enter a simple SQL SELECT statement, specifying fields as needed (e.g., “SELECT * FROM AddressType”). Refer to the sections above for more details on writing custom views.
- Click Show translation to show the Spark code that gets deployed and confirm that it looks correct.

- Click OK to save the view.
Once deployed, the notebook view definition is available as a Fabric notebook.

You can create custom scripts referencing these views to generate data frames or output in notebook runs.

To integrate notebook views into larger workflows, add scripts to deployment notebooks that reference your views. See Customize code on Fabric Lakehouse for more information.

The referenced views enable advanced data processing and analysis directly within workbook notebooks.