Skip to main content

StarRocks

Query existing Paimon tables through a StarRocks external catalog. Start with Connecting Engines if you need to identify the catalog and warehouse.

Version​

Paimon catalogs are available in StarRocks 3.1 and later. Individual features depend on the StarRocks release. Use the StarRocks Paimon catalog documentation for the supported catalog backends, storage configuration, and release-specific limitations.

This integration reads Paimon tables. Creating an external catalog does not create or copy the tables, and the catalog does not support inserting, updating, or deleting Paimon data.

Prerequisites​

Prepare an existing Paimon database and table. Ensure the StarRocks processes that access metadata and data can reach the metastore and warehouse. Configure authentication and filesystem access using the StarRocks documentation for your storage system.

Create Paimon Catalog​

Choose the backend used by the writer. These examples assume HDFS access is already configured; replace the host names and warehouse path with your deployment values.

Filesystem Catalog​

CREATE EXTERNAL CATALOG paimon_catalog PROPERTIES (
"type" = "paimon",
"paimon.catalog.type" = "filesystem",
"paimon.catalog.warehouse" = "hdfs://namenode:8020/warehouse/paimon"
);

Hive Metastore Catalog​

CREATE EXTERNAL CATALOG paimon_hms PROPERTIES (
"type" = "paimon",
"paimon.catalog.type" = "hive",
"paimon.catalog.warehouse" = "hdfs://namenode:8020/warehouse/paimon",
"hive.metastore.uris" = "thrift://metastore:9083"
);

For object storage, use the warehouse URI and authentication properties from the StarRocks catalog examples.

Query​

Assume test_db.test_tbl already exists in the configured warehouse:

SELECT * FROM paimon_catalog.test_db.test_tbl LIMIT 10;

Query System Tables​

On StarRocks versions supporting Paimon system tables, append the system-table suffix to the table name. Quote the complete table identifier containing $:

SELECT * FROM paimon_catalog.test_db.`test_tbl$partitions`;
SELECT * FROM paimon_catalog.test_db.`test_tbl$ro`;

The $ro table reads compacted data from a primary-key table. Its results can lag behind the latest snapshot until a full compaction completes. Use the ordinary table query when you need the latest state supported by the reader. See MOR Read Optimized for maintenance settings.

Type Mapping​

The following table summarizes common Paimon types as exposed by StarRocks. It describes the read direction; it does not imply support for creating these types in Paimon from StarRocks. Refer to the upstream type mapping for your release, including precision and type limits.

Paimon typeStarRocks type
BOOLEANBOOLEAN
TINYINT, SMALLINT, INT, BIGINTCorresponding integer type
FLOAT, DOUBLEFLOAT, DOUBLE
DECIMAL(p, s)DECIMAL(p, s)
CHAR(n)CHAR(n)
VARCHAR(n), STRINGVARCHAR
BINARY(n), VARBINARY(n)VARBINARY
DATEDATE
TIMESTAMP, TIMESTAMP WITH LOCAL TIME ZONEDATETIME
ARRAYARRAY
MAPMAP
ROWSTRUCT

Next Steps​