Sangwon
05/20/2026, 12:44 AMRocky
05/20/2026, 12:44 AMALTER CATALOG statement. This feature was introduced in recent versions (added via PR #56212 and confirmed in versions such as v3.2.x, v3.3.x, and v4.0).
Syntax
The basic syntax for modifying catalog properties is:
sql
ALTER CATALOG <catalog_name> SET ("key" = "value", ...);
(Note: Some contexts or versions may also use SET PROPERTIES instead of just SET).
Common Use Cases
You can modify various configuration properties depending on the catalog type (Hive, Iceberg, JDBC, etc.). Common examples include:
* Updating Metadata Cache Settings:
If you need to change how frequently StarRocks refreshes external metadata:
sql
ALTER CATALOG hive_catalog SET ("metastore_cache_refresh_interval_sec" = "600");
* Integrating with Apache Ranger:
To add or update a Ranger service name for access control:
sql
ALTER CATALOG hive_catalog SET ("ranger.plugin.hive.service.name" = "ranger_hive_service");
* Modifying Connection URIs:
For catalogs like Hive or Iceberg, you can update the metastore URI:
sql
ALTER CATALOG paimon_catalog SET ("hive.metastore.uris" = "<thrift://new_host:9083>");
* Disabling Caches:
Useful for troubleshooting or when external data changes very frequently:
sql
ALTER CATALOG iceberg_catalog SET ("enable_iceberg_metadata_cache" = "false");
Important Notes
* Documentation: As of some recent releases, this command may not be fully detailed in all versions of the official "SQL Reference" docs, but it is functional and recommended for updates that don't require a full catalog recreation.
* Internal Catalog: You cannot modify the properties of the default_catalog (the internal StarRocks catalog) using this command.
* Recreation Alternative: If you are on an older version (pre-v3.2) that does not support ALTER CATALOG, you must DROP CATALOG <name> and then CREATE EXTERNAL CATALOG <name> with the updated properties.
References
• sql-reference/sql-statements/Catalog/SET_CATALOG.md
• sql-reference/sql-statements/table_bucket_part_index/ALTER_TABLE.md
• sql-reference/sql-statements/Catalog/CREATE_EXTERNAL_CATALOG.md
• sql-reference/sql-statements/Resource/ALTER_RESOURCE.md
• data_source/catalog/unified_catalog.md
• data_source/catalog/hive_catalog.mdSangwon
05/20/2026, 12:46 AMRocky
05/20/2026, 12:47 AMALTER CATALOG statement.
This feature was introduced via PR #56212 and is available in StarRocks versions v3.3.12+, v3.4, and v4.0.
Syntax
sql
ALTER CATALOG <catalog_name> SET ("key" = "value", ...);
Usage Examples
You can update various configuration properties depending on the catalog type without needing to drop and recreate it. Common use cases include:
* Integrating Apache Ranger:
Update or add Ranger service names for external access control:
sql
ALTER CATALOG hive_catalog SET ("ranger.plugin.hive.service.name" = "ranger_hive_svc");
* Adjusting Metadata Cache:
Modify how frequently StarRocks refreshes external metadata (e.g., for Hive or Hudi):
sql
ALTER CATALOG my_hive_catalog SET ("metastore_cache_refresh_interval_sec" = "600");
* Updating Connection URIs:
Update the Hive Metastore or Glue connection details:
sql
ALTER CATALOG iceberg_catalog SET ("hive.metastore.uris" = "<thrift://new_host:9083>");
Important Notes
1. Supported Catalog Types: While support started with Hive and Hudi catalogs, it has been expanded to other external catalog types (like Iceberg and JDBC) in later versions.
2. Internal Catalog: You cannot use this command to modify the default_catalog (the internal StarRocks catalog).
3. Legacy Versions: If you are on a version earlier than v3.3.12 that does not support ALTER CATALOG, you must DROP CATALOG and CREATE EXTERNAL CATALOG again with the new properties.
4. Resource Alternative: For some older Iceberg/Hive setups that use "Resources," you may need to use ALTER RESOURCE instead.
References
• sql-reference/sql-statements/Catalog/SET_CATALOG.md
• sql-reference/sql-statements/Resource/ALTER_RESOURCE.md
• sql-reference/sql-statements/table_bucket_part_index/ALTER_TABLE.md
• sql-reference/sql-statements/Catalog/DROP_CATALOG.md
• sql-reference/sql-statements/Catalog/CREATE_EXTERNAL_CATALOG.md
• sql-reference/sql-statements/Database/ALTER_DATABASE.md
• data_source/catalog/unified_catalog.md