Using DatabricksSubmitRunOperator inside @task — is pool applied correctly #62403
Unanswered
Rishabh1627rawat
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
You are not supposed to run operator in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m using Airflow 3.x with the
@taskdecorator (TaskFlow API), and I’m trying to better understand how Airflow handles execution and pools when an operator is called inside a Python task.Right now, I’m using this pattern:
In this setup:
@taskhas a pool assigned.DatabricksSubmitRunOperator.op.execute(context=context).This successfully triggers my Databricks notebook, and because
wait_for_termination=True, the task waits until the notebook run finishes.However, I want to better understand what is happening internally.
Specifically:
@task?DatabricksSubmitRunOperatortreated as a separate task?DatabricksSubmitRunOperatordirectly in the DAG instead of wrapping it inside a@task?I understand that manually calling
.execute()may bypass some of Airflow’s orchestration mechanisms. I’m especially curious how this pattern affects:This is not a functional issue — everything runs successfully. I just want to understand the internal behavior better and ensure I’m following best practices without unintentionally bypassing Airflow’s concurrency controls.
I would appreciate any clarification on how the scheduler treats this pattern internally.
Beta Was this translation helpful? Give feedback.
All reactions