Each StarRocks cluster (version 2.3 and later) has exactly one built-in internal catalog named default_catalog. Use it to query data stored directly in the StarRocks cluster, as opposed to data in external sources such as Hive or Iceberg.
How it works
StarRocks uses a three-tier naming hierarchy: catalog.database.table. The default_catalog is the top-level root for all internal databases and tables. For example, default_catalog.sales_db.orders refers to the orders table in the sales_db database of the internal catalog.
The default_catalog name is fixed — you cannot rename it or create additional internal catalogs.
Query internal data
Replace <db_name> and <table_name> with actual values.
Connect to the StarRocks cluster. For more information, see Getting started.
MySQL client: After connecting,
default_catalogis active by default.Java Database Connectivity (JDBC): Specify the database in the connection string using the
default_catalog.<db_name>format.
(Optional) List all databases in the cluster.
SHOW DATABASES; -- Or specify the catalog explicitly SHOW DATABASES FROM default_catalog;(Optional) Switch to a database.
USE <db_name>; -- Or specify the catalog explicitly USE default_catalog.<db_name>;Query internal data.
SELECT * FROM <table_name>;If you skipped step 3, include the database name in the query:
-- Without specifying the catalog SELECT * FROM <db_name>.<table_name>; -- With the catalog specified SELECT * FROM default_catalog.<db_name>.<table_name>;