Benefits
By using Views, you can:- Standardize common queries across your organization.
- Share these standard queries with others.
- Allow for finer-grained control over query results.
- Prevent accidental writes to tables.
Before you start
Before using this feature, ensure that you have:- An Account within a Professional, Innovation, or Enterprise Edition Organization. For more information, see Create a Wherobots Account.
- Both Admin and User roles have access to Views in Wherobots Cloud.
- A writable schema in a Wherobots-managed catalog. The first example also requires an existing table with
countryandregioncolumns; replace the example’sorg_catalog.joins.polygonstable name with yours. The geospatial example creates its own source tables.
Create a view
To create a new view from an existing table in a Wherobots Notebook:- Log in to Wherobots Cloud.
- Start a notebook with a runtime of your choice.
-
Open the notebook and execute the following code to initiate the SedonaContext.
-
Replace the catalog, schema, and source table names in the following code with yours, then run it to create a view. Choose a suffix that is unique within your schema.
To see the new view in Wherobots Cloud, navigate to the Data Hub. Click on the view to verify its details, schema, and SQL definition.
Update a view
To update an existing view’s definition, execute aCREATE OR REPLACE VIEW statement with an updated SQL query in your Wherobots Notebook. This example keeps only groups with two or more polygons.
Rename a view
To rename an existing view, use theALTER VIEW command in your Wherobots Notebook.
Delete a view
To delete a view, use theDROP VIEW command:
List views
To list all views in a specific catalog and schema within your Wherobots organization, run theSHOW VIEWS command:
Example: Create a view with geospatial data
This example demonstrates how to create a view that combines geospatial data from two different datasets: building footprints and elevation data.-
In a Wherobots Notebook, initiate the SedonaContext if you haven’t already:
-
Create the example schema, then load the sample datasets and write them to your catalog. If your organization uses a different writable managed catalog, replace
org_catalog.joinsthroughout this example. -
Create a view that joins the two tables and calculates the average elevation for each building.
Now, you can query or visualize your new view.
Usage considerations
- Currently, views from Unity Catalog are not accessible and will not appear in the Data Hub interface.
- Currently, creating views that reference tables stored in Unity Catalog is an unsupported operation.
- Within the Wherobots Managed Catalog, you have the flexibility to create views that reside in one existing catalog/schema while referencing data from another existing catalog/schema.

