GIT 中的拉取请求后更新 Databricks 工作区笔记本

Update Databricks workspace notebook after pull request in GIT

我已 GIT 集成到 Azure Databricks 中,并且希望每次我向 Dev 发出拉取请求时都能够在我的工作区中更新笔记本,从而在 [=16= 中进行任何更新] 也出现在我的工作区笔记本中。 我相信有一种方法可以通过在发生这种情况时在 DevOps 中启动发布管道来做到这一点,并且可能 API 可以帮助解决这个问题,但我没有找到任何信息。

执行此操作的任何信息或文章链接都将非常有帮助,谢谢。

只有当您在 Databricks Repos - it's not possible to update notebook in the workspace via API. When you have repository checked out, you may update it to the latest state of selected branch using the Update command of Repos REST API or using the repos update command of the Databricks CLI 中有笔记本时,才有可能实现自动化。对于拉取请求,您需要弄清楚如何获取分支名称,因为它严重依赖于特定的 Git 实现 - 您可以在 Azure DevOps 文档中找到该信息。

我有一个 working example 将 Databricks Repos 与 Azure DevOps 集成,用于测试笔记本中的代码并使用 Databricks CLI 在阶段之间进行升级。存储库包含有关如何设置所有内容的详细说明 - 将所有内容都放在这里太多了。