
[英]Execute git pull on databricks notebook using CLI and/or API
[英]How to write Notebook to Databricks using API?
我可以使用此处记录的 API 将数据文件写入 Databricks:
https://docs.databricks.com/dev-tools/api/latest/index.html
https://docs.databricks.com/dev-tools/api/latest/dbfs.html
我有几个要写入 Databricks 实例的笔记本。 我在 API 文档中没有看到如何执行此操作。 有没有办法使用 Rest API 将 Notebook 写入 Databricks 实例? 这是在哪里记录的?
您需要改用 Workspace API,特别是Import call 。 例如,使用 curl(来自文档的示例):
curl -n -F path=/Users/user@example.com/project/ScalaExampleNotebook -F language=SCALA \
-F content=@example.scala \
https://<databricks-instance>/api/2.0/workspace/import
如果您不直接使用 API,更好的方法是使用Databricks CLI 的workspace
子命令( import
或import_dir
),或使用Databricks Terraform 提供程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.