SYSTEM$GET_LISTING_URL_FOR_EXTERNAL_CONSUMER
functionnot supportedNative apps, listings & sharingReturns the connection details that an external consumer uses to connect to an external listing: the catalog name, catalog URI, OAuth scope, and OAuth token endpoint. The external consumer uses these values to connect with an Iceberg REST Catalog client.
Syntax
SYSTEM$GET_LISTING_URL_FOR_EXTERNAL_CONSUMER( '<listing_name>' , '<external_consumer_name>' )
Parameters
| Name | Required | Description |
|---|---|---|
'listing_name' | required | Name of the external listing. The name must be enclosed in single quotes. |
'external_consumer_name' | required | Name of the external consumer to return the connection details for. The external consumer must be a target of the listing. The name must be enclosed in single quotes. The connection details depend on the external consumer’s region, so a listing that targets consumers in different regions returns different values for each consumer. |
Returns
Returns a JSON object containing the following fields:
Usage notes
- The returned values depend on the external consumer’s region. Call the function separately for each external consumer.
- The external consumer authenticates with a programmatic access token (PAT) or workload identity federation (WIF), depending on how you configured the external consumer. For more information, see Workload identity federation for external consumers.
- Provide the catalog, catalog_uri, scope, and oauth_token_uri values to the external consumer, along with their PAT or workload identity details. The consumer sends token requests to oauth_token_uri and catalog requests to catalog_uri. For instructions, see Connect to an open-sharing catalog.
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 connection details 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.