Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 10:45 PM
@ashdam
You've got three ways of doing the workflows deployment:
1. DAB (Databricks Asset Bundles)
2. Terraform (https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/job)
3. Use CLI/Python SDK through your notebook, ex.
import requests
job_json = """
# Put JSON with job contents here
"""
api_token = nb_context['extraContext']['api_token']
ws_host = f"https://{nb_context['tags']['browserHostName']}"
job_api_url = f"{ws_host}/api/2.1/jobs/create"
auth_headers = {"Authorization" : f"Bearer {api_token}"}
create_job = requests.post(job_api_url, headers=auth_headers, data=job_json)
print("Status Code", create_job.status_code)
print("JSON Response ", create_job.json())