snow helpers v1-to-v2¶
Snowpark, Streamlit, Native App 프로젝트 정의 파일을 V1에서 V2로 마이그레이션합니다.
구문¶
snow helpers v1-to-v2
--accept-templates
--migrate-local-overrides / --no-migrate-local-overrides
--format <format>
--verbose
--debug
--silent
인자¶
없음
선택 사항¶
-t, --accept-templates
템플릿 마이그레이션을 허용합니다. 기본값: False.
-l, --migrate-local-overrides / --no-migrate-local-overrides
snowflake.local.yml의 값을 메인 프로젝트 정의에 병합합니다. snowdrop.local.yml 파일은 마이그레이션되지 않고, 대신 해당 값은 snowdrop.yml 파일의 출력에 반영됩니다. 설정하지 않고 snowflake.local.yml이 있으면 오류가 발생합니다.
--format [TABLE|JSON]
출력 형식을 지정합니다. 기본값: TABLE.
--verbose, -v
로그 수준
info
이상의 로그 항목을 표시합니다. 기본값: False.--debug
로그 수준
디버그
이상에 대한 로그 항목을 표시하며, 디버그 로그에는 추가 정보가 포함됩니다. 기본값: False.--silent
콘솔로의 중간 출력을 끕니다. 기본값: False.
--help
이 명령에 대한 도움말 텍스트를 표시합니다.
사용법 노트¶
Snowflake CLI 3.0에서는 V2 프로젝트 정의 파일에 대한 지원이 도입되었습니다. 기존 V1.x 프로젝트 정의 파일이 있는 경우, snow helpers v1-to-v2
명령을 사용하여 파일을 V2 버전으로 변환할 수 있습니다. 이 명령은 원본 버전을 snowflake_V1.yml
파일에 보존합니다.
이 명령은 snowflake.yml
파일과 동일한 디렉터리에서 실행해야 합니다.
주의
Snowflake CLI 3.0에서는 프로젝트 정의 템플릿을 처리하는 방식이 변경되었기 때문에 Snowflake는 템플릿 을 사용하는 프로젝트 정의 파일이 변환 후 올바르게 작동한다고 보장할 수 없습니다. 기본적으로 이 명령은 템플릿이 포함된 1.x 파일을 변환하려고 하면 오류를 생성합니다. 명령이 이러한 유형의 파일을 강제로 변환하도록 하려면 --accept-templates
옵션을 사용하면 됩니다. 그런 다음 모든 템플릿을 V2 버전과 동일하게 수동으로 업데이트해야 합니다.
예¶
버전 1.x 프로젝트 정의 파일을 변환합니다.
cd <project-directory> snow helpers v1-to-v2
Project definition migrated to version 2.
버전 2 프로젝트 정의 파일을 변환합니다.
cd <project-directory> snow helpers v1-to-v2
Project definition is already at version 2.
템플릿이 포함된 버전 1 프로젝트 정의를
--accept-templates
옵션을 사용하지 않고 변환합니다.cd <project-directory> snow helpers v1-to-v2
+- Error---------------------------------------------------------------------+ | Project definition contains templates. They may not be migrated correctly, | | and require manual migration.You can try again with --accept-templates | | option, to attempt automatic migration. | +----------------------------------------------------------------------------+
버전 1 프로젝트 정의를
--accept-templates
옵션으로 변환합니다.cd <project-directory> snow helpers v1-to-v2
WARNING snowflake.cli._plugins.workspace.commands:commands.py:60 Your V1 definition contains templates. We cannot guarantee the correctness of the migration. Project definition migrated to version 2