是否可以通过 REST API 运行 databricks 笔记本的单元格?
我想通过 REST API 自动运行笔记本单元,以提高我们创建的开发工具的可用性 更好。这在数据块中可能吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我想通过 REST API 自动运行笔记本单元,以提高我们创建的开发工具的可用性 更好。这在数据块中可能吗?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
是的,使用较旧的 API 版本 1.2 是可能的。您需要使用 创建执行上下文/api/1.2/contexts/create API(需要集群ID和使用的语言),然后可以使用/api/1.2/commands/execute API,并使用 /api/1.2/commands/status API。请注意,您需要保留上下文来执行多个相互依赖的命令...
您可以找到 Databricks Terraform 提供程序源代码中使用 Go 语言执行此类执行的示例
Yes, it's possible by using an older API version 1.2. You need to create an execution context with /api/1.2/contexts/create API (it requires cluster ID and what language is used), and then you can submit code using the /api/1.2/commands/execute API, and get command execution status using /api/1.2/commands/status API. Please note that you need to keep context to execute multiple commands depending on each other...
You can find an example of such execution using the Go language in the source code of Databricks Terraform provider