The data catalog provides a unified interface for managing StarRocks metadata. This topic describes how to create and manage data objects, such as tables and views, within the data catalog.
The StarRocks data catalog in DataWorks lets you:
Add existing StarRocks data sources to the catalog
Create and manage tables, views, and materialized views through a visual interface
Generate query SQL directly from the catalog tree
Remove data sources when no longer needed
Go to the StarRocks data catalog page
Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a region. Find the workspace and choose Shortcuts > Data Studio in the Actions column.
In the navigation pane on the left, click the
icon. In the Data Catalog tree, click StarRocks to open the StarRocks data catalog management page.
Create a StarRocks data catalog
On the StarRocks data catalog management page, add existing StarRocks data sources to the catalog list.
Prerequisites
Before you begin, make sure that:
A StarRocks data source has already been created in the current workspace. See Create a data source.
The StarRocks user has the
SELECTprivilege on theinformation_schemadatabase. Without this privilege, metadata fails to load. See Manage users and data authorization.
Add data sources
Click the
icon to the right of the StarRocks data catalog to open the add instance page.On the DataWorks Data Source tab, add the StarRocks data source:
To add a single data source, find it in the list and click Add in the Actions column.
To add multiple data sources at once, select them and click Batch Add below the list.
Manage a StarRocks data catalog
In the StarRocks data catalog, manage data objects including tables, views, and materialized views.
Manage tables
Manage views
Manage materialized views
A materialized view pre-computes and stores query results, making it well-suited for complex queries over large tables — such as multi-table joins or aggregations — where recomputing results repeatedly would be expensive.
View and remove a StarRocks data catalog
View the data catalog.
Click the
icon to the left of the data catalog to see the added instances.Hover over a StarRocks instance to see the name of the attached data source.
Remove a data catalog. Right-click the data catalog and select Remove.
FAQ
Why does metadata fail to load with the error "you need (at least one of) the SELECT privilege(s) on TABLE tables for this operation"?
Grant the SELECT privilege on the information_schema database to the StarRocks user. See Manage users and data authorization.