来自 Databricks Notebook 的 运行 git 命令
Run git command from Databricks Notebook
现在可以 link 您的 git Databricks 存储库。但是,您似乎只能通过单击按钮使用界面提交和推送或拉取。
有没有 运行 notebook 中的一些代码可以直接提交、推送或拉取。
我尝试执行以下操作但出现错误:
%sh git pull
错误:fatal: not a git repository (or any of the parent directories): .git
我想这样做的主要原因是 运行 每周完成一项工作,并确保在 运行 编写代码之前拉取开发中的最后更改。
不,您不能这样做,因为笔记本不是磁盘上的真实文件 - 这些对象不存储在文件系统中。是的,它们可以链接到 Git,但它们不是 Databricks 中的文件。
现在,有名为“Projects" that will allow to build something like this using the special API. You can ask your admins to contact Databricks about this feature, because it's quite handy, and easier integrated with CI/CD systems, etc. - for example, you can look to this demo.
的功能的私人预览版
同时您可以执行以下操作:
- Link 你的笔记本到 Git - 这将是你正在使用的开发副本,使用 UI push/commit/pull
- 创建一个单独的文件夹来保存作业的笔记本
- 设置 CI/CD 管道,它将监听提交,获取更改的笔记本,并使用 [=13= 的
import
或 import_dir
命令将它们复制到单独的文件夹](如果您使用的是 Azure),但其他 CI/CD 系统的步骤类似。
现在可以 link 您的 git Databricks 存储库。但是,您似乎只能通过单击按钮使用界面提交和推送或拉取。
有没有 运行 notebook 中的一些代码可以直接提交、推送或拉取。
我尝试执行以下操作但出现错误:
%sh git pull
错误:fatal: not a git repository (or any of the parent directories): .git
我想这样做的主要原因是 运行 每周完成一项工作,并确保在 运行 编写代码之前拉取开发中的最后更改。
不,您不能这样做,因为笔记本不是磁盘上的真实文件 - 这些对象不存储在文件系统中。是的,它们可以链接到 Git,但它们不是 Databricks 中的文件。
现在,有名为“Projects" that will allow to build something like this using the special API. You can ask your admins to contact Databricks about this feature, because it's quite handy, and easier integrated with CI/CD systems, etc. - for example, you can look to this demo.
的功能的私人预览版同时您可以执行以下操作:
- Link 你的笔记本到 Git - 这将是你正在使用的开发副本,使用 UI push/commit/pull
- 创建一个单独的文件夹来保存作业的笔记本
- 设置 CI/CD 管道,它将监听提交,获取更改的笔记本,并使用 [=13= 的
import
或import_dir
命令将它们复制到单独的文件夹](如果您使用的是 Azure),但其他 CI/CD 系统的步骤类似。