[英]databricks configure using cmd and R
我正在尝试使用 databricks cli 并调用 databricks configure 这就是我从 cmd 中执行的操作
somepath>databricks configure --token
Databricks Host (should begin with https://): my_https_address
Token: my_token
我想使用 R 调用相同的命令。所以我做了:
tool.control <- c('databricks configure --token'
,'my_https_address'
,'my_token')
shell(tool.control)
我收到以下错误
Error in system(command, as.integer(flag), f, stdout, stderr, timeout) :
character string expected as first argument
我该如何纠正?
编辑:尝试评论中的建议后,我收到此错误:
Databricks Host (should begin with https://): Aborted!
'https:' is not recognized as an internal or external command,
operable program or batch file.
'my_token' is not recognized as an internal or external command,
operable program or batch file.
[[1]]
[1] 1
[[2]]
[1] 1
[[3]]
[1] 1
Warning messages:
1: In FUN(X[[i]], ...) :
'databricks configure --token' execution failed with error code 1
2: In FUN(X[[i]], ...) :
'my_https_address' execution failed with error code 1
3: In FUN(X[[i]], ...) :
'my_token' execution failed with error code 1
使用 cmd 安装和配置 Azure Databricks CLI 的步骤:
Step1:安装Python,如果你使用Python 2,你需要Python 2.7.9及以上版本,如果你使用Python 3,则需要Python 3.6及以上版本。
步骤 2:使用适用于 Python 安装的 pip 版本运行pip install databricks-cli
。 如果您使用的是 Python 3,请运行pip3 install databricks-cli
。
第 3 步:设置身份验证 => 要对 Databricks REST API 进行身份验证和访问,您需要使用个人访问令牌。 令牌类似于密码; 你应该小心对待他们。 令牌过期并且可以撤销。
单击 Azure Databricks 工作区右上角的用户配置文件图标用户配置文件。
单击用户设置。
转到访问令牌选项卡。
步骤 4:复制 databricks 主机"https://centralus.azuredatabricks.net/"
的 URL 和之前创建的令牌。
Step5:在cmd中运行“dbfs configure --token”如下图:
dbfs configure --token
Databricks Host (should begin with https://): https://centralus.azuredatabricks.net
Token: dapi72026dsfsdfsh987hjfiu431
步骤 6:使用 CMD 成功配置 Databricks CLI。
要验证尝试运行“databricks fs ls”,请检查您是否能够看到 DBFS。
参考: Databricks CLI
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.