적용 대상: Databricks SQL
Databricks Runtime 10.4 LTS 이상
Unity 카탈로그에만 해당
지정된 이름으로 공유를 만듭니다. 동일한 이름의 공유가 이미 존재하는 경우 예외가 발생합니다.
공유를 만들려면 metastore 관리자이거나 CREATE SHARE
공유하려는 데이터가 등록된 Unity 카탈로그 메타스토어에 대한 권한이 있어야 합니다.
공유에 콘텐츠를 추가하려면 ALTER SHARE사용합니다.
구문
CREATE SHARE [ IF NOT EXISTS ] share_name
[ COMMENT comment ]
매개 변수
-
만들어질 공유의 이름입니다.
존재하지 않으면
공유가 없으면 지정된 이름으로 공유를 만듭니다. 이름이 같은 공유가 이미 존재하면 아무 일도 일어나지 않습니다.
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';