Categories:

System functions (System Information)

SYSTEM$DESC_ICEBERG_ACCESS_IDENTITY

返回有关账户中指定外部云提供商的 Snowflake 服务主体的信息。

See also:

Configure replication for Snowflake-managed Apache Iceberg™ tables

语法

SYSTEM$DESC_ICEBERG_ACCESS_IDENTITY(
  '<cloud_storage_provider>' [ , '<account_name>' ] )

必填实参

'cloud_storage_provider'

指定要检索其服务主体信息的云提供商。您可以为此实参指定以下值之一:

  • 'S3'
  • 'GCS'
  • 'AZURE'

可选实参

'account_name'

Optionally specifies the name of the Snowflake account for which you want to retrieve the service principal information. If specified, you must use the value in the account_name column returned by the SHOW REPLICATION ACCOUNTS command.

如果未指定,该函数将返回当前账户的信息。

返回

该函数返回包含以下名称/值对的 JSON 对象:

S3

{
  "STORAGE_PROVIDER":"S3",
  "STORAGE_AWS_IAM_USER_ARN":"<iam_user_arn>"
}

其中:

STORAGE_PROVIDER

云存储提供商。

STORAGE_AWS_IAM_USER_ARN

自动为您的 Snowflake 账户创建的 AWS IAM 用户的 ARN。

GCS

{
  "STORAGE_PROVIDER":"GCS",
  "STORAGE_GCP_SERVICE_ACCOUNT":"<service_account_identifier>"
}

其中:

STORAGE_PROVIDER

云存储提供商。

STORAGE_GCP_SERVICE_ACCOUNT

自动为您的 Snowflake 账户创建的 GCS 服务账户的 ID。

AZURE

{
  "STORAGE_PROVIDER":"AZURE",
  "AZURE_MULTI_TENANT_APP_NAME":"<client_app_name>",
  "AZURE_CONSENT_URL_TEMPLATE":"https://login.microsoftonline.com/<your_tenant_id>/oauth2/authorize?client_id=..."
}

其中:

STORAGE_PROVIDER

云存储提供商。

AZURE_MULTI_TENANT_APP_NAME

为 Snowflake 账户创建的 Snowflake 客户端应用程序的名称。

AZURE_CONSENT_URL_TEMPLATE

Template URL to the Microsoft permissions request page. You must replace your_tenant_id with the ID for your tenant that the storage location belongs to.

To find your tenant ID, log into the Azure portal and click Azure Active Directory » Properties. The tenant ID is displayed in the Tenant ID field.

使用说明

仅返回账户管理员(具有 ACCOUNTADMIN 角色)的结果。

示例

检索 Azure 的服务主体:

SELECT SYSTEM$DESC_ICEBERG_ACCESS_IDENTITY('AZURE', 'MY_TARGET_SNOWFLAKE_ACCOUNT');