ha2hi commented on code in PR #64766:
URL: https://github.com/apache/airflow/pull/64766#discussion_r3147413233
##########
providers/databricks/src/airflow/providers/databricks/operators/databricks.py:
##########
@@ -410,6 +410,51 @@ def execute(self, context: Context) -> int:
return job_id
+class DatabricksDeleteJobsOperator(BaseOperator):
+ """
+ Deletes a Databricks job.
+
+ :param job_id: The ID of the Databricks job to delete. (templated)
+ :param databricks_conn_id: Reference to the Databricks connection.
+ """
+
+ template_fields: Sequence[str] = ("job_id",)
+
+ def __init__(
+ self,
+ *,
+ job_id: int,
+ databricks_conn_id: str = "databricks_default",
+ polling_period_seconds: int = 30,
+ databricks_retry_limit: int = 3,
+ databricks_retry_delay: int = 1,
+ databricks_retry_args: dict[Any, Any] | None = None,
+ **kwargs,
+ ) -> None:
+ super().__init__(**kwargs)
+ self.job_id = job_id
+ self.databricks_conn_id = databricks_conn_id
+ self.polling_period_seconds = polling_period_seconds
+ self.databricks_retry_limit = databricks_retry_limit
+ self.databricks_retry_delay = databricks_retry_delay
+ self.databricks_retry_args = databricks_retry_args
Review Comment:
Since polling_period_seconds is not utilized within this operator, I've
removed the parameter and the attribute to avoid misleading the users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]