Databricks 创建维护历史的新工作
每次我创建一项新工作时,它不会覆盖现有工作,而是创建一个同名的新工作。 我首先想到的是删除所有具有特定名称的作业,然后再创建该作业。问题是我无法保留与新作业关联的已删除作业历史记录(日志等)。有没有办法使用 databricks cli 覆盖保留与前一个作业相关的所有信息的作业?
databricks jobs list --output json | jq '.jobs[] | select(.settings.name == "test_job") | .job_id' | xargs -n 1 databricks jobs delete --job-id
databricks jobs create --json-file ./jobs_jsons/test_job.json
Everytime I created a new job, instead of overwriting the existing one it created a new one with the same name.
First thing that came to my mind was to delete all the jobs with a certain name and create the job afterwards. The problem with this is that I cant keep the deleted job history (logs etc) associated with the new job. Is there a way to overwrite the job mantaining all the info associated with the previous job using databricks cli?
databricks jobs list --output json | jq '.jobs[] | select(.settings.name == "test_job") | .job_id' | xargs -n 1 databricks jobs delete --job-id
databricks jobs create --json-file ./jobs_jsons/test_job.json
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要为此使用
databricks jobs Reset
- 它将覆盖作业定义,而不创建新作业(请参阅文档):You need to use
databricks jobs resets
for that - it will overwrite jobs definition, without creating a new job (see docs):