部署 Snowpark 项目¶
The snow snowpark deploy command uploads local files to the specified stage and creates procedure and function objects defined in the project. Deploying the project alters all objects defined in it. By default, if any of the objects exist already the commands fails unless you provide the --replace option. All deployed objects use the same artifact, which is uploaded only once.
When you run snow snowpark deploy, the command does the following:
- Snowflake CLI checks whether any of the defined objects (functions or procedures) already exists.
- If any exist and the
--replaceflag is not provided, the command exits. The reasoning behind this approach is to be “production-safe” by avoiding unintentional changes to existing objects. - If all objects don’t exist or
--replaceis provided, the command:- If the
--pruneflag is provided, all previous contents of the stages used by defined procedure and function objects are removed. - 上传新的 zip 工件。
- 更新每个过程的定义。
- 更新每个函数的定义。
- If the