설정 스크립트는 앱이 설치되거나 업그레이드될 때 공유 및 목록을 생성합니다. 앱 사양은 설정 중에 또는 저장 프로시저를 통해 런타임에 생성할 수 있습니다.
앱을 구성할 때 컨슈머는 목록에서 대상 계정과 자동 복제 설정을 검토하고 승인합니다. 자동 복제 설정은 리전 간 공유에만 적용할 수 있습니다. 컨슈머가 앱 사양을 보고 승인하는 방법에 대한 자세한 내용은 Approve app specifications 섹션을 참조하세요.
TARGET_ACCOUNTS: 데이터를 공유할 대상 계정의 쉼표로 구분된 목록으로, 작은따옴표로 묶입니다. 각 계정은 OrgName.AccountName 형식으로 지정해야 합니다(예: 'ProviderOrg.ProviderAccount,PartnerOrg.PartnerAccount').
LISTING: 앱에서 생성한 목록 오브젝트의 식별자입니다.
AUTO_FULFILLMENT_REFRESH_SCHEDULE: 선택 사항입니다. 리전 간 데이터 공유를 위한 새로 고침 일정입니다. <num>MINUTE 또는 :code:`USING CRON <expression>`으로 지정할 수 있습니다.
참고
앱 사양의 목록 이름은 앱에서 생성한 기존 목록과 일치해야 합니다. 이 값을 설정한 후에는 목록 이름을 변경할 수 없습니다.
공유에 연결된 외부 목록을 만들려면 다음 예와 같이 설정 스크립트에 CREATE LISTING 명령을 추가합니다.
CREATEEXTERNALLISTINGIFNOTEXISTScompliance_listingSHAREcompliance_shareAS$$title:"Compliance Data Share"subtitle:"Regulatory compliance reporting data"description:"Share compliance and audit data with authorized accounts"listing_terms: type:"OFFLINE" $$PUBLISH=FALSEREVIEW=FALSE;
참고
앱은 애플리케이션 패키지가 아닌 공유만 목록에 첨부할 수 있습니다.
앱은 대상 계정 또는 자동 복제 구성을 목록에 직접 추가할 수 없습니다.
목록 매니페스트에는 title, subtitle, description 및 listing_terms 속성만 포함될 수 있습니다.
모든 새 목록은 게시되지 않은 상태로 생성해야 하며, PUBLISH 및 REVIEW가 모두 FALSE로 설정되어 있어야 합니다.
목록 제목과 설명은 컨슈머 정보를 기준으로 사용자 지정할 수 있으므로 공급자가 데이터 소스를 구분할 수 있습니다.
ALTERAPPLICATIONSETSPECIFICATIONshareback_specTYPE=LISTINGLABEL='Compliance Data Sharing'DESCRIPTION='Share compliance data with provider for regulatory reporting'TARGET_ACCOUNTS='ProviderOrg.ProviderAccount,AuditorOrg.AuditorAccount'LISTING=compliance_listingAUTO_FULFILLMENT_REFRESH_SCHEDULE='720 MINUTE';
이 명령은 이름이 ``shareback_spec``이며 지정된 대상 계정과 데이터를 공유할 수 있는 권한을 요청하는 앱 사양을 생성합니다.
리전 간 공유의 경우, AUTO_FULFILLMENT_REFRESH_SCHEDULE 매개 변수는 필수입니다. 다음 값 중 하나로 설정할 수 있습니다.
'<num>MINUTE': 분을 나타내는 숫자(최소 10분)
최대 8일 또는 11520분(8일)
'USINGCRON<expression><time_zone>': 타임존이 있는 Cron 식
-- Check if the app specification is approved:SHOWAPPROVEDSPECIFICATIONSINAPPLICATION;-- Validate the listing configuration:DESCLISTINGcompliance_listing;
공유 무결성: Snowflake는 컨슈머가 애플리케이션에서 생성된 공유를 수정하지 못하게 하지 않습니다. 결과적으로, 공급자는 기본 공유 데이터의 무결성을 보호하기 위한 조치를 구현할 책임이 있습니다.
오류 처리: 앱 사양이 거부되거나 아직 승인되지 않은 경우에 적절한 오류 처리를 구현합니다.
리전 간 고려 사항: 앱 공급자는 데이터 최신성 요구 사항과 비용 고려 사항 간에 적절한 균형을 맞추는 새로 고침 일정을 설정할 책임이 있습니다. 목록 자동 복제 비용은 앱 컨슈머에게 청구되지만, 공급자는 앱 컨슈머에게 불필요한 비용을 최소화하기 위해 비용을 인식해야 합니다.
After a consumer approves the LISTING app specification and data is shared, the provider
can view the shared listing and access the data. Providers can do this using either
Snowsight or SQL.
Sign in to Snowsight as a user with the ACCOUNTADMIN role.
In the navigation menu, select Data sharing»External sharing.
Select the Shared with you tab.
Find the shareback listing from the consumer and select it.
Follow the prompts to install the listing and create a database from the shared data.
To find the listing shared by the consumer, run SHOW AVAILABLE LISTINGS
with the IS_SHARED_WITH_ME filter:
SHOWAVAILABLE LISTINGSIS_SHARED_WITH_ME=TRUE;
Identify the listing_global_name of the shareback listing from the output. Then create a
database from the listing:
Before approving a LISTING app specification, consumers should inspect the data that the app
intends to share. This provides full visibility into the actual content of a share, allowing
consumers to verify the following:
The data being shared matches what the provider described in the app specification.
No sensitive or unexpected data is included in the share.
The data meets any internal compliance or governance requirements.
Consumers can inspect data prior to approval and continue to query it at any time after approval.
Use either Snowsight or SQL to view the shared data.
Sign in to Snowsight as a user with the ACCOUNTADMIN role.
앱의 페이지로 이동합니다.
애플리케이션 페이지에서 Permissions 탭을 선택합니다.
:ui:`Data sharing`에서 요청된 데이터 공유에 대해 :ui:`Review`를 클릭합니다. 다음 세부 정보가 표시됩니다.
데이터 공유 목록의 이름
앱이 데이터 공유를 요청하는 이유
데이터 공유에 액세스할 수 있는 계정
데이터 공유에 대한 복제 일정
To preview the data, click the Preview data button. The shared data is displayed in
table format, grouped by schema. Note that the shared data is not editable.
다른 스키마 또는 테이블의 공유 데이터를 보려면 드롭다운 메뉴를 사용합니다.
To open the data in a worksheet for further querying, click the Open in workspace button.
The Uniform Listing Locator (ULL) is a unique identifier for app-created listings that allows
consumers to query shared datasets directly. To find the ULL for a specific listing, check the
uniform_listing_locator column in the output of the SHOW LISTINGS or DESC LISTING commands.
To query the shared data, reference objects using the ULL, which contains a NATIVEAPP$
prefix followed by the listing SQL name: