Unix服务可以巧妙地暂停雪花仓库以降低成本。
snowflake-smart-suspend的Python项目详细描述
雪花智能挂起智能挂起正在运行的未使用的仓库,达到小时界限。 目前专为仓库设计,启用自动恢复,没有自动暂停,以便更好地优化。
用法和详细信息
安装:
pip install snowflake-smart-suspend
典型用法通常如下:
smart_suspend start -c connections -r <role which has access to warehouses of interest> -s 55 -i 30 -w <space separated list of warehouses>
有关所有选项的详细信息,请使用:
smart_suspend -h smart_suspend --help
配置
如果您已经在服务器上安装并运行了snowsql,smart-suspend就可以开箱即用 否则,您将不得不在HOME/.snowsql/config位置使用雪花cred:
[connections] accountname = <account name> username = <username> password = <password>
日志记录
日志可以在/var/log/smartsuspend/system.log中找到。在安装过程中,可能需要调整对日志目录的权限。
依赖性
- 它是为python3而写的,python3是语言的现在和未来