Apache Iceberg™ 테이블에 카탈로그 판매 자격 증명 사용¶
Iceberg 테이블에 대한 자격 증명 지원을 통해 외부 볼륨 을 사용하지 않고도 클라우드 저장소의 테이블 데이터 및 메타데이터에 대한 Snowflake 액세스 권한을 부여할 수 있습니다.
대신 서드 파티 Iceberg REST 카탈로그(예: Snowflake Open Catalog)로 액세스 제어를 구성하고 위임한 다음, 제공된 자격 증명에 맞게 구성된 Snowflake에서 카탈로그 통합을 만듭니다. 카탈로그 통합과 연결된 모든 Iceberg 테이블의 경우 Snowflake는 카탈로그 공급자가 제공한 자격 증명을 사용하여 외부 클라우드 저장소에 안전하게 연결합니다.
참고
Using catalog-vended credentials is supported for externally managed Iceberg tables that use a REST catalog integration. To use this feature, your external catalog must also support credential vending.
고려 사항¶
카탈로그에서 판매되는 자격 증명을 Iceberg 테이블에 사용할 때는 다음 사항을 고려하십시오.
This feature is supported for tables that store their data and metadata in Amazon S3, Azure Storage, or Google Cloud Storage.
테이블 파일은 1개의 버킷에 저장해야 하며, 여러 버킷에 분산해서 저장할 수 없습니다.
REST 카탈로그로 구성된 서비스 주체에는 버킷의 테이블 파일이 포함된 모든 위치에서 읽을 수 있는 권한이 있어야 합니다. AWS Lake Formation을 AWS Glue와 함께 사용하는 경우 이 액세스를 활성화하려면 추가 단계를 수행해야 할 수 있습니다. 자세한 내용은 (선택 사항) Lake Formation 액세스 제어 구성하기 섹션을 참조하세요.
Snowflake는 클라우드 저장소 공급자에 따라 카탈로그가 다음 토큰 중 하나를 제공할 것으로 예상합니다.
AWS: An expiration time for the AWS session token. Snowflake searches for a key-value pair where the key is
s3.session-token-expires-at-ms, and the value is a timestamp that specifies the expiration time in milliseconds.Azure: An expiration time for the SAS token. Snowflake searches for a key-value pair where the key is
adls.sas-token-expires-at-ms, and the value is a timestamp that specifies the expiration time in milliseconds.Google Cloud Storage: An expiration time for the OAuth 2.0 access token. Snowflake searches for a key-value pair where the key is
gcs.oauth2.token-expires-at, and the value is a timestamp that specifies the expiration time in milliseconds.
If your catalog doesn’t provide a token, Snowflake expects your catalog to provide an expiration time for vended credentials, and searches for a key-value pair where the key is
expiration-time, and the value is a timestamp that specifies the expiration time in milliseconds; for example,1730234407000.카탈로그에 만료 시간이 제공되지 않는 경우 Snowflake는 자격 증명이 수신 후 60분 후에 만료되는 것으로 가정합니다.
Table creation fails if your catalog provides credentials that aren’t valid.
CREATE ICEBERG TABLE … AS SELECT 명령은 지원되지 않습니다.
비공개 연결은 지원되지 않습니다. 비공개 연결을 사용하려면 :doc:`외부 볼륨을 구성</user-guide/tables-iceberg-configure-external-volume>`해야 합니다.
판매된 자격 증명을 위한 카탈로그 통합 생성하기¶
발급된 자격 증명에 대한 카탈로그 통합을 생성하려면 ACCESS_DELEGATION_MODE 속성을 VENDED_CREDENTIALS`로 설정한 상태에서 :doc:/sql-reference/sql/create-catalog-integration-rest` 명령을 사용합니다.
여기서
ACCESS_DELEGATION_MODE = { VENDED_CREDENTIALS | EXTERNAL_VOLUME_CREDENTIALS }외부 클라우드 저장소에 있는 Iceberg 테이블 파일에 액세스할 때 사용할 액세스 위임 모드를 지정합니다.
VENDED_CREDENTIALS은 Snowflake가 제공된 자격 증명을 사용하도록 지정합니다.EXTERNAL_VOLUME_CREDENTIALS은 Snowflake가 외부 볼륨을 사용하도록 지정합니다.
기본값:
EXTERNAL_VOLUME_CREDENTIALS
You can specify the ACCESS_DELEGATION_MODE property in the list of REST_CONFIG properties in any
CREATE CATALOG INTEGRATION(Apache Iceberg™ REST) statement.
중요
액세스 제어를 위해 AWS Lake Formation을 사용하는 경우 Snowflake가 AWS Glue 카탈로그 또는 Amazon S3 테이블에 액세스할 수 있는지 확인해야 합니다. 자세한 내용은 (선택 사항) Lake Formation 액세스 제어 구성하기 섹션을 참조하십시오.
예: AWS Glue¶
다음 예제에서는 발급된 자격 증명을 사용하는 AWS Glue에 대한 카탈로그 통합을 생성합니다. 자세한 내용은 AWS Glue Iceberg REST 에 대한 카탈로그 통합 구성하기 섹션을 참조하십시오.
CREATE CATALOG INTEGRATION glue_rest_catalog_int
CATALOG_SOURCE = ICEBERG_REST
TABLE_FORMAT = ICEBERG
CATALOG_NAMESPACE = 'rest_catalog_integration'
REST_CONFIG = (
CATALOG_URI = 'https://glue.us-west-2.amazonaws.com/iceberg'
CATALOG_API_TYPE = AWS_GLUE
CATALOG_NAME = '123456789012'
ACCESS_DELEGATION_MODE = VENDED_CREDENTIALS
)
REST_AUTHENTICATION = (
TYPE = SIGV4
SIGV4_IAM_ROLE = 'arn:aws:iam::123456789012:role/my-role'
SIGV4_SIGNING_REGION = 'us-west-2'
)
ENABLED = TRUE;
예시: Amazon S3 테이블¶
이 예제에서는 Lake Formation을 사용하여 SigV4 자격 증명 벤딩이 활성화된 Amazon S3 테이블 에 대한 카탈로그 통합을 생성합니다.
CREATE OR REPLACE CATALOG INTEGRATION my_s3_tables_catalog_integration
CATALOG_SOURCE = ICEBERG_REST
TABLE_FORMAT = ICEBERG
CATALOG_NAMESPACE = 'my_namespace'
REST_CONFIG = (
CATALOG_URI = 'https://glue.us-west-2.amazonaws.com/iceberg'
CATALOG_API_TYPE = AWS_GLUE
CATALOG_NAME = '123456789012:S3tablescatalog/my_table_bucket'
ACCESS_DELEGATION_MODE = VENDED_CREDENTIALS
)
REST_AUTHENTICATION = (
TYPE = SIGV4
SIGV4_IAM_ROLE = 'arn:aws:iam::123456789012:role/my_api_permissions_role'
)
ENABLED = TRUE;
여기서
CATALOG_URI = 'https://glue.us-west-2.amazonaws.com/iceberg'`AWS Glue Iceberg REST 엔드포인트<https://docs.aws.amazon.com/glue/latest/dg/connect-glu-iceberg-rest.html>`_를 지정합니다.
CATALOG_NAME = 'aws_account_id:s3tablescatalog/s3_table_bucketAWS 계정에 S3 테이블 버킷을 지정합니다.
판매된 자격 증명을 사용하는 Iceberg 테이블 생성하기¶
서드 파티 Iceberg REST 카탈로그로 액세스 제어를 설정하고 벤딩된 자격 증명에 대한 카탈로그 통합을 만든 후에는 Iceberg 테이블을 만들 수 있습니다.
발급된 자격 증명을 사용하는 Iceberg 테이블을 생성할 때 ACCESS_DELEGATION_MODE = VENDED_CREDENTIALS`로 구성된 카탈로그 통합을 지정하고 :doc:/sql-reference/sql/create-iceberg-table-rest` 문에서 EXTERNAL_VOLUME 매개 변수를 제외합니다.
예:
CREATE ICEBERG TABLE my_iceberg_table
CATALOG = open_catalog_int_vended_credentials
CATALOG_TABLE_NAME = 'my_table'
AUTO_REFRESH = TRUE;
참고
계정, 데이터베이스 또는 스키마 수준에서 기본 외부 볼륨을 설정한 경우, 제공된 자격 증명을 사용하도록 구성된 카탈로그 통합을 지정하는 한 테이블을 생성하는 동안에는 기본 외부 볼륨을 무시합니다.