ALTER CATALOG#

Synopsis#

ALTER CATALOG
catalog_name
[ RENAME TO catalog_new_name ]
SET PROPERTIES property_name = expression [, ...]

Description#

Modify the configuration of a catalog.

Note

The ALTER CATALOG SQL statement is available as a public preview in Starburst Enterprise. Contact Starburst Support with questions or feedback.

catalog_name must be the name of an existing catalog on the cluster.

The RENAME TO clause renames the catalog to a new name as specified.

The SET PROPERTIES clause lists one or more catalog configuration properties to modify in the target catalog configuration. Property names can be double quoted, which is required if they contain special characters, like -. Refer to the connector documentation to learn about all available properties. All property values must be varchars (single quoted), including numbers and boolean values.

The query fails in the following circumstances:

  • An invalid property is set, for example there is a typo in the property name, or a property name from a different connector was used. connector.name cannot be modified using ALTER CATALOG.

  • The value of the property is invalid, for example a numeric value is out of range, or a string value doesn’t match the required pattern.

  • The value references an environmental variable that is not set on the coordinator node.

  • Credentials are sent in plain text rather than passed with secrets management, if catalog.store=starburst is configured.

Note

This command requires the catalog management type to be set to dynamic.

The complete ALTER CATALOG query is logged and visible in the Starburst Enterprise web UI, but security-sensitive configuration properties are masked.

Examples#

Modify an existing catalog alpha and rename it to beta:

ALTER CATALOG alpha
RENAME TO beta

Modify an existing catalog brain, which uses the Memory connector, to alter the maximum data used per node:

ALTER CATALOG brain
SET PROPERTIES "memory.max-data-per-node" = '256MB';

Notice that the connector property contains dashes (-) and needs to quoted using a double quote ("). The value 256MB is quoted using single quotes, because it is a string literal.

Modify the example catalog that uses the PostgreSQL connector with a different password credential and altered configuration:

ALTER CATALOG example
SET PROPERTIES
  "connection-password" = '${ENV:POSTGRES_SERVICE_PASSWORD}',
  "case-insensitive-name-matching" = 'true',
  "dynamic-filtering.wait-timeout" = '30s'
;

This example assumes that the POSTGRES_SERVICE_PASSWORD environmental variables is set as a secret on all nodes of the cluster.

See also#