snow dbt deploy¶
Upload local dbt project files and create or update a DBT project object on Snowflake. Examples: snow dbt deploy PROJECT snow dbt deploy PROJECT –source=/Users/jdoe/project –force
구문¶
snow dbt deploy
<name>
--source <source>
--profiles-dir <profiles_dir>
--force / --no-force
--default-target <default_target>
--unset-default-target
--external-access-integration <external_access_integrations>
--install-local-deps
--connection <connection>
--host <host>
--port <port>
--account <account>
--user <user>
--password <password>
--authenticator <authenticator>
--workload-identity-provider <workload_identity_provider>
--private-key-file <private_key_file>
--token <token>
--token-file-path <token_file_path>
--database <database>
--schema <schema>
--role <role>
--warehouse <warehouse>
--temporary-connection
--mfa-passcode <mfa_passcode>
--enable-diag
--diag-log-path <diag_log_path>
--diag-allowlist-path <diag_allowlist_path>
--oauth-client-id <oauth_client_id>
--oauth-client-secret <oauth_client_secret>
--oauth-authorization-url <oauth_authorization_url>
--oauth-token-request-url <oauth_token_request_url>
--oauth-redirect-uri <oauth_redirect_uri>
--oauth-scope <oauth_scope>
--oauth-disable-pkce
--oauth-enable-refresh-tokens
--oauth-enable-single-use-refresh-tokens
--client-store-temporary-credential
--format <format>
--verbose
--debug
--silent
--enhanced-exit-codes
--decimal-precision <decimal_precision>
인자¶
nameDBT 프로젝트의 식별자(예: my_pipeline)입니다.
선택 사항¶
--source TEXT배포할 dbt 파일이 포함된 디렉터리의 경로입니다. 기본값은 현재 작업 디렉터리입니다.
--profiles-dir TEXTprofiles.yml이 포함된 디렉터리의 경로입니다. 기본값은 –source에 제공된 디렉터리 또는 현재 작업 디렉터리입니다.
--force / --no-force프로젝트에서 충돌하는 파일이 있으면 이를 덮어씁니다. 기본값: False.
--default-target TEXTDefault target for the dbt project. Mutually exclusive with –unset-default-target.
--unset-default-targetUnset the default target for the dbt project. Mutually exclusive with –default-target. Default: False.
--external-access-integration TEXTExternal access integration to be used by the dbt object.
--install-local-depsInstalls local dependencies from project that don’t require external access. Default: False.
--connection, -c, --environment TEXTconfig.toml파일에 정의된 연결의 이름입니다. 기본값:default.--host TEXT연결을 위한 호스트 주소입니다. 연결에 지정된 값을 재정의합니다.
--port INTEGER연결의 포트입니다. 연결에 지정된 값을 재정의합니다.
--account, --accountname TEXTSnowflake 계정에 할당된 이름입니다. 연결에 지정된 값을 재정의합니다.
--user, --username TEXTSnowflake에 연결할 사용자 이름입니다. 연결에 지정된 값을 재정의합니다.
--password TEXTSnowflake 비밀번호입니다. 연결에 지정된 값을 재정의합니다.
--authenticator TEXTSnowflake 인증자입니다. 연결에 지정된 값을 재정의합니다.
--workload-identity-provider TEXT워크로드 ID 공급자(AWS, AZURE, GCP, OIDC). 연결에 지정된 값을 재정의합니다.
--private-key-file, --private-key-path TEXTSnowflake 개인 키 파일 경로입니다. 연결에 지정된 값을 재정의합니다.
--token TEXTSnowflake에 연결할 때 사용할 OAuth 토큰입니다.
--token-file-path TEXTSnowflake에 연결할 때 사용할 OAuth 토큰이 포함된 파일 경로입니다.
--database, --dbname TEXT사용할 데이터베이스입니다. 연결에 지정된 값을 재정의합니다.
--schema, --schemaname TEXT사용할 데이터베이스 스키마입니다. 연결에 지정된 값을 재정의합니다.
--role, --rolename TEXT사용할 역할입니다. 연결에 지정된 값을 재정의합니다.
--warehouse TEXT사용할 웨어하우스입니다. 연결에 지정된 값을 재정의합니다.
--temporary-connection, -xUses a connection defined with command-line parameters, instead of one defined in config. Default: False.
--mfa-passcode TEXT다단계 인증(MFA)에 사용할 토큰입니다.
--enable-diag연결 진단 보고서를 생성할지 여부입니다. 기본값: False.
--diag-log-path TEXT생성된 보고서의 경로입니다. 기본값은 시스템 임시 디렉터리입니다. 기본값: <system_temporary_directory>.
--diag-allowlist-path TEXT허용 목록 매개 변수가 포함된 JSON 파일의 경로입니다.
--oauth-client-id TEXTSnowflake 통합을 위해 ID 공급자가 제공한 클라이언트 ID의 값입니다.
--oauth-client-secret TEXTSnowflake 통합을 위해 ID 공급자가 제공한 클라이언트 시크릿의 값입니다.
--oauth-authorization-url TEXT드라이버에 인증 코드를 제공하는 ID 공급자 엔드포인트입니다.
--oauth-token-request-url TEXT드라이버에 액세스 토큰을 제공하는 ID 공급자 엔드포인트입니다.
--oauth-redirect-uri TEXT인증 코드 리디렉션에 사용할 URI 입니다.
--oauth-scope TEXTID 공급자 승인 요청에서 요청된 범위입니다.
--oauth-disable-pkcePKCE (Proof Key for Code Exchange)를 비활성화합니다. 기본값:
False.--oauth-enable-refresh-tokens실제 액세스 토큰이 오래되었을 때 자동 재인증을 활성화합니다. 기본값:
False.--oauth-enable-single-use-refresh-tokens일회용 새로 고침 토큰 시맨틱에 옵트인할지 여부입니다. 기본값:
False.--client-store-temporary-credential임시 자격 증명을 저장합니다.
--format [TABLE|JSON|JSON_EXT|CSV]출력 형식을 지정합니다. 기본값: TABLE.
--verbose, -v로그 수준
정보이상에 대한 로그 항목을 표시합니다. 기본값: False.--debug로그 수준
디버그이상에 대한 로그 항목을 표시하며, 디버그 로그에는 추가 정보가 포함됩니다. 기본값: False.--silent콘솔로의 중간 출력을 끕니다. 기본값: False.
--enhanced-exit-codes실패 유형에 따라 종료 오류 코드를 차별화하십시오. 기본값: False.
--decimal-precision INTEGERNumber of decimal places to display for decimal values. Uses Python’s default precision if not specified.
--help이 명령에 대한 도움말 텍스트를 표시합니다.
사용법 노트¶
snow dbt deploy 명령은 로컬 파일을 임시 스테이지에 업로드한 후 새 오브젝트를 만들거나, 새 버전을 만들어서 기존 dbt 프로젝트 오브젝트를 업데이트합니다. 유효한 dbt 프로젝트 오브젝트에는 다음의 두 파일이 포함되어야 합니다.
dbt_project.yml: A standard dbt configuration file that specifies the profile to use.profiles.yml: A dbt connection profile definition referenced indbt_project.yml.profiles.yamlmust define the database, role, schema, and type.<profile_name>: target: dev outputs: dev: database: <database_name> role: <role_name> schema: <schema_name> warehouse: <warehouse_name> type: snowflake
예¶
:codenowrap:`jaffle_shop`이라는 dbt 프로젝트를 배포합니다.
snow dbt deploy jaffle_shop
지정된 디렉터리에서 :codenowrap:`jaffle_shop`이라는 프로젝트를 배포하고, dbt 프로젝트 오브젝트가 이미 있으면 이를 덮어씁니다.
snow dbt deploy jaffle_shop --force --source /path/to/dbt/directory --profiles-dir ~/.dbt/
Deploy a project named
jaffle_shopfrom a specified directory using a custom profiles directory and enabling external access integrations:snow dbt deploy jaffle_shop --force --source /path/to/dbt/directory --profiles-dir ~/.dbt/ --default-target dev --external-access-integration dbthub-integration --external-access-integration github-integration