CREATE SHARE

적용 대상:검사 '예'로 표시 Databricks SQL 검사 '예'로 표시 Databricks Runtime 10.4 LTS 이상 검사 '예'로 표시 Unity 카탈로그만 해당

지정된 이름으로 공유를 만듭니다. 동일한 이름의 공유가 이미 있는 경우 예외가 throw됩니다.

공유를 만들려면 metastore 관리자이거나 CREATE SHARE 공유하려는 데이터가 등록된 Unity 카탈로그 메타스토어에 대한 권한이 있어야 합니다.

공유에 콘텐츠를 추가하려면 ALTER SHARE를 사용합니다.

구문

CREATE SHARE [ IF NOT EXISTS ] share_name
    [ COMMENT comment ]

매개 변수

  • share_name

    만들 공유의 이름입니다.

  • IF NOT EXISTS

    지정된 이름의 공유가 없는 경우 공유를 만듭니다. 이름이 같은 공유가 이미 있으면 아무 작업도 수행되지 않습니다.

  • comment

    선택적 STRING 리터럴입니다. 공유에 대한 설명입니다.

예제

-- Create share `customer_share`. This throws exception if a share with name customer_share
-- already exists.
> CREATE SHARE customer_share;

-- Create share `customer_share` only if share with same name doesn't exist.
> CREATE SHARE IF NOT EXISTS customer_share;

-- Create share `customer_share` only if share with same name doesn't exist, with a comment.
> CREATE SHARE IF NOT EXISTS customer_share COMMENT 'This is customer share';