SYSTEM$LIST_NAMESPACES_FROM_CATALOG

functionsupportedIceberg & external tables

docs.snowflake.com ↗

System functions

Lists the namespaces in a remote Apache Iceberg™ REST catalog (including Snowflake Open Catalog).

Syntax

supportedpartialnot supportednot scored

SYSTEM$LIST_NAMESPACES_FROM_CATALOG( '<catalog_integration_name>'
  [ , '<parent_namespace>', <levels> ] )

Parameters

NameRequiredDescription
catalog_integration_namerequiredIdentifier for the catalog integration for Iceberg REST or Snowflake Open Catalog.
parent_namespaceoptionalThe identifier of the namespace from which to start listing namespaces. If CATALOG_NAMESPACE is defined at the catalog integration level, to retrieve results for the 0th namespace level in the catalog, specify an empty string (''). If CATALOG_NAMESPACE is only defined at the table level, the results for the 0th namespace level are returned by default, so you don’t need to specify an empty string (''). Default: If CATALOG_NAMESPACE is defined at the catalog integration level, the namespace for the catalog integration. If CATALOG_NAMESPACE is only defined at the table level, you retrieve results for the 0th namespace level in the catalog.
levelsoptionalSpecifies the number of levels to traverse in the namespace hierarchy for listing child namespaces. For example: If set to 0, the function returns all of the namespaces, recursively, relative to the parent_namespace. If set to 1, the function returns all of the namespaces one level under the parent_namespace. If set to n, the function returns namespaces up to n levels deep, relative to the parent_namespace. Default: 1

Returns

Returns a JSON-formatted string which lists namespaces in the Iceberg REST catalog for the specified parent namespace and number of levels. The JSON-formatted string has the following structure:

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes USAGE | Integration (catalog) | For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

See also

Referenced by