CREATE APPLICATION¶
애플리케이션 패키지 또는 목록을 기준으로 |native-app|을 만듭니다. 공급자는 이 명령을 사용하여 개발 계정에 앱을 설치합니다.
When this command runs, it runs the setup script to create the app.
구문¶
CREATE APPLICATION <name> FROM APPLICATION PACKAGE <package_name>
[ USING RELEASE CHANNEL { QA | ALPHA | DEFAULT } ]
[ COMMENT = '<string_literal>' ]
[ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , ... ] ) ]
[ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
[ WITH FEATURE POLICY = <policy_name> ]
CREATE APPLICATION <name> FROM APPLICATION PACKAGE <package_name>
USING <path_to_version_directory>
[ DEBUG_MODE = { TRUE | FALSE } ]
[ COMMENT = '<string_literal>' ]
[ [ WITH ] TAG ( <tag_name> = '<tag_value>' [, ...] ) ]
[ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
[ WITH FEATURE POLICY = <policy_name> ]
CREATE APPLICATION <name> FROM APPLICATION PACKAGE <package_name>
USING VERSION <version_identifier> [ PATCH <patch_num> ]
[ DEBUG_MODE = { TRUE | FALSE } ]
[ COMMENT = '<string_literal>' ]
[ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , ... ] ) ]
[ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
[ WITH FEATURE POLICY = <policy_name> ]
CREATE APPLICATION <name> FROM LISTING <listing_name>
[ USING RELEASE CHANNEL { QA | ALPHA | DEFAULT } ]
[ COMMENT = '<string_literal>' ]
[ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , ... ] ) ]
[ BACKGROUND_INSTALL = { TRUE | FALSE } ]
[ AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE } ]
[ WITH FEATURE POLICY = <policy_name> ]
필수 매개 변수¶
nameSpecifies the identifier for the app. Must be unique for your account.
또한, 식별자는 알파벳 문자로 시작해야 하며 전체 식별자 문자열을 큰따옴표(예:
"My object")로 묶지 않는 한 공백이나 특수 문자를 포함할 수 없습니다. 큰따옴표로 묶인 식별자도 대/소문자를 구분합니다.자세한 내용은 식별자 요구 사항 섹션을 참조하십시오.
FROM APPLICATION PACKAGE package_nameSpecifies the name of the application package used to create the app. To use this clause to create an app from an application package without specifying a stage or a version/patch, the application package must have a default release directive defined.
This clause can only be used to create an app in the same account as the application package. This clause cannot be used to create an app in development mode.
FROM LISTING listing_nameSpecifies the name of the listing that contains the application package used to create the app.
USING RELEASE CHANNEL QA | ALPHA | DEFAULT앱을 만드는 데 사용되는 애플리케이션 패키지 또는 목록에 정의된 릴리스 채널을 지정합니다. 이 절을 지정하지 않으면 기본 릴리스 채널이 사용됩니다.
:code:`QA`는 품질 보증 릴리스 채널을 지정합니다.
:code:`ALPHA`는 알파 릴리스 채널을 지정합니다.
:code:`DEFAULT`는 기본 릴리스 채널을 지정합니다.
This clause can be used only when creating an app from an application package that has a release directive defined or when creating an app from a listing.
USING path_to_version_directorySpecifies the path to the stage that contains the files required by the app.
USING version [ PATCH patch_num ]Specifies the version, and optionally the patch, defined in the application package used to create the app.
선택적 매개 변수¶
COMMENT = 'string_literal'Specifies a comment for the app.
기본값: 값 없음
DEBUG_MODE = { TRUE | FALSE }Enables or disables debug mode for the app being created. Debug mode allows a provider to see the contents of the app.
TRUEenables debug mode for the installed app.FAlSEdisables debug mode for the installed app.
참고
You can only enable debug mode under the following conditions:
The app is in the same account as the application package.
The app is being created based on a specific version or from files on a named stage.
TAG ( tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ] )태그 이름과 태그 문자열 값을 지정합니다.
태그 값은 항상 문자열이며, 태그 값의 최대 문자 수는 256자입니다.
문에서 태그를 지정하는 방법에 대한 자세한 내용은 Tag quotas 섹션을 참조하십시오.
BACKGROUND_INSTALL = { TRUE | FALSE }Creates the app from a listing in the background. If you specify this clause, the command returns you to the prompt immediately, and the installation process continues in the background. To monitor that status of the installation, use the DESCRIBE APPLICATION command.
참고
When this clause is used, the app is created even if the command fails. In this situation, use the DROP APPLICATION command to delete the object before running the CREATE APPLICATION command again.
이 절은 주로 Snowsight 에서 백그라운드에 Snowflake Native App 을 설치하는 데 사용됩니다. 컨슈머는 백그라운드 설치를 통해 설치 중에 Snowsight 의 목록에서 벗어날 수 있습니다. 공급자는 목록을 게시하기 전에 목록에서 Snowflake Native App 설치를 테스트할 때 이 절을 사용할 수 있습니다.
AUTHORIZE_TELEMETRY_EVENT_SHARING = { TRUE | FALSE }앱에서 로그 및 이벤트 공유 를 활성화합니다.
WITH FEATURE POLICY = policy_name지정된 기능 정책으로 앱을 만듭니다. 앱이 기능 정책에서 금지하는 오브젝트(예: 데이터베이스)를 만들려고 시도하면 명령이 실패합니다.
액세스 제어 요구 사항¶
이 작업을 실행하는 데 사용되는 역할 에는 최소한 다음 권한 이 있어야 합니다.
권한 |
오브젝트 |
참고 |
|---|---|---|
CREATE APPLICATION |
계정 |
|
DEVELOP |
애플리케이션 패키지 |
|
INSTALL |
애플리케이션 패키지 |
|
IMPORT SHARE CREATE APPLICATION |
계정 |
애플리케이션 패키지가 포함된 계정과는 다른 계정에서 앱을 생성하려면 이러한 권한이 필요합니다. |
APPLY FEATURE POLICY APPLY 또는 OWNERSHIP |
계정 기능 정책 |
WITH FEATURE POLICY 절을 사용하여 앱을 만들 때 기능 정책을 적용하려면 이러한 권한이 필요합니다. |
사용법 노트¶
To create an app directly from an application package, you must specify a default release directive in the application package.
The app differs from a database in the following ways:
An app may not be transient.
The role with the OWNERSHIP privilege on the app has the following abilities and limitations:
Can drop the database or modify the COMMENT property and any properties that are specific to the app.
Cannot see or modify the contents of the app except via the privileges granted the application roles.
스키마 또는 데이터베이스 역할과 같은 데이터베이스 수준 오브젝트를 만들 수 없습니다.
메타데이터 관련:
주의
고객은 Snowflake 서비스를 사용할 때 개인 데이터(사용자 오브젝트 제외), 민감한 데이터, 수출 통제 대상 데이터 또는 기타 규제 데이터가 메타데이터로 입력되지 않도록 해야 합니다. 자세한 내용은 Snowflake의 메타데이터 필드 섹션을 참조하십시오.
CREATE OR REPLACE <오브젝트> 문은 원자성입니다. 즉, 오브젝트가 바뀔 때 단일 트랜잭션으로 이전 오브젝트가 삭제되고 새 오브젝트가 생성됩니다.
예¶
CREATE APPLICATION hello_snowflake_app
FROM APPLICATION PACKAGE hello_snowflake_package
USING VERSION v1;
+---------------------------------------------------------+
| status |
|---------------------------------------------------------|
| Application 'hello_snowflake_app' created successfully. |
+---------------------------------------------------------+
CREATE APPLICATION hello_snowflake_app
FROM APPLICATION PACKAGE hello_snowflake_package
USING '@hello_snowflake_code.core.hello_snowflake_stage';
+---------------------------------------------------------+
| status |
|---------------------------------------------------------|
| Application 'hello_snowflake_app' created successfully. |
+---------------------------------------------------------+