- Categories:
System functions (System Control)
SYSTEM$GET_ LISTING_ URL_ FOR_ EXTERNAL_ CONSUMER¶
Returns the catalog URL and catalog URI for an external listing, enabling an external consumer to connect using an Iceberg REST Catalog client.
- See also:
Syntax¶
Arguments¶
Required:
'listing_name'Name of the external listing. The name must be enclosed in single quotes.
Returns¶
Returns a JSON object containing the following fields:
| Field | Description |
|---|---|
catalog | The catalog name the external consumer uses to identify the shared data. |
catalog_uri | The Iceberg REST Catalog endpoint URL the external consumer uses to connect. |
Access control requirements¶
A role used to execute this operation must have the following privileges at a minimum:
| Privilege | Object | Notes |
|---|---|---|
| OWNERSHIP or USAGE | Listing | Required to retrieve the catalog URL for the listing. |
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.
Usage notes¶
- The external consumer must authenticate using the Programmatic Access Token (PAT) generated for their external consumer identity.
- During Private Preview, the catalog URI returns data only from the region where the provider account is located.
- Provide both the
catalog_urivalue and the PAT to the external consumer so they can connect with an Iceberg REST Catalog client.
Examples¶
Retrieve the catalog URL for an external listing named TEST_LISTING:
Example output: