- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 01:59 AM
Hi everyone,
I'm using Databricks Asset Bundles to deploy a job that includes a run_job_task, which requires a job_id to trigger another job.
For different targets (dev, staging, prod), I need to pass different job_ids dynamically. To achieve this, I’ve defined the variable in the variables section and tried to override it per environment in the targets section.
However, when I run databricks bundle validate, I encounter the following error:
Here’s a simplified version of what I’m trying:
variables:
job_id:
description: Downstream job ID
targets:
dev:
variables:
job_id: 1234
staging:
variables:
job_id: 5678
prod:
variables:
job_id: 91011
resources:
jobs:
main_job:
name: trigger-${bundle.target}-downstream
tasks:
- task_key: trigger_downstream
run_job_task:
job_id: ${var.job_id}
wait_for_completion: trueIs this the correct way to define and override variables for different targets in Asset Bundles? Or should this be handled differently (e.g., through variable-overrides.json or CLI)?
Appreciate any guidance!
Thanks in advance!