数据块的命令行接口
databricks-cli的Python项目详细描述
databricks命令行界面(cli)是一个开源工具,它提供了一个易于使用的界面 数据块平台。cli构建在databricks restapi之上。
注意:此cli正在进行活动开发,并作为实验客户端发布。这意味着接口仍然可以更改。
如果你对这个项目感兴趣,请联系我们。 另外,请在我们的GitHub project上留下错误报告作为问题。
要求
- python版本>;2.7.9或>;3.6
安装
安装只需运行 pip install --upgradedatabricks-cli
然后使用用户名/密码或authentication token设置身份验证。凭据存储在~/.databrickscfg。
- databricks configure(提示时输入主机名/用户名/密码)
- databricks configure --token(提示时输入hostname/auth token)
databricks configure --profile <profile> [--token]还支持多个连接配置文件。 连接配置文件可以这样使用:databricks workspace ls --profile <profile>。
要测试身份验证信息是否正常工作,请尝试像databricks workspace ls这样的快速测试。
已知问题
AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2'
databricks web服务要求客户端使用tlsv1.2。内置的 python for macos版本没有内置此版本的tls。
要使用databricks cli,必须安装具有ssl.PROTOCOL_TLSv1_2的python版本。 对于macos,最简单的方法可能是使用Homebrew安装python。
使用Docker
# build image docker build -t databricks-cli . # run container docker run -it databricks-cli # run command in docker docker run -it databricks-cli fs --help