The error happens because my_pipeline.id does not exist when the Asset Bundle is defined. Resource IDs are only created after deployment, so your job is effectively created with pipeline_id = None. When the job runs, Databricks tries to run a pipeline with ID None, which results in the “Run permissions on pipeline None” error.
In Databricks Asset Bundles, you must link resources symbolically, not by accessing their IDs directly in Python.
To fix this, reference the pipeline using the bundle resource reference syntax:
my_task = Task(
task_key="My_pipeline_task",
pipeline_task=PipelineTask(
pipeline_id="${resources.pipelines.my_pipeline.id}"
)
)
Here, my_pipeline is the Python variable name used when defining the Pipeline resource. Databricks resolves this reference to the actual pipeline ID at deploy time.
Your job definition can then remain unchanged.
One important note: because your pipeline is running in continuous mode, triggering it from a job will restart the pipeline each time the job runs. If you don’t need scheduled restarts or orchestration with other tasks, you may not need a job at all, just deploying the pipeline is sufficient.
Key takeaway: never use .id directly in Asset Bundle code. Always use ${resources.<type>.<name>.id} to link bundle-managed resources.