airflow.providers.databricks.plugins.databricks_workflow¶
Attributes¶
Classes¶
Constructs a link to monitor a Databricks Job Run.  | 
|
Constructs a link to send a request to repair all failed tasks in the Databricks workflow.  | 
|
Construct a link to send a repair request for a single databricks task.  | 
|
Databricks Workflows plugin for Airflow.  | 
Functions¶
  | 
Return a list of all Databricks task IDs for a dictionary of Airflow tasks.  | 
  | 
Retrieve the launch task ID from the current task group or a parent task group, recursively.  | 
  | 
|
  | 
Store the Databricks job run link in XCom during task execution.  | 
Module Contents¶
- airflow.providers.databricks.plugins.databricks_workflow.get_databricks_task_ids(group_id, task_map, log)[source]¶
 Return a list of all Databricks task IDs for a dictionary of Airflow tasks.
- Parameters:
 group_id (str) – The task group ID.
task_map (dict[str, airflow.providers.databricks.operators.databricks.DatabricksTaskBaseOperator]) – A dictionary mapping task IDs to BaseOperator instances.
log (airflow.sdk.types.Logger) – The logger to use for logging.
- Returns:
 A list of Databricks task IDs for the given task group.
- Return type:
 
- airflow.providers.databricks.plugins.databricks_workflow.get_launch_task_id(task_group)[source]¶
 Retrieve the launch task ID from the current task group or a parent task group, recursively.
- Parameters:
 task_group (airflow.providers.common.compat.sdk.TaskGroup) – Task Group to be inspected
- Returns:
 launch Task ID
- Return type:
 
- class airflow.providers.databricks.plugins.databricks_workflow.WorkflowJobRunLink(context=None)[source]¶
 Bases:
airflow.providers.common.compat.sdk.BaseOperatorLink,airflow.utils.log.logging_mixin.LoggingMixinConstructs a link to monitor a Databricks Job Run.
- name = 'See Databricks Job Run'[source]¶
 Name of the link. This will be the button name on the task UI.
- get_link(operator, dttm=None, *, ti_key=None)[source]¶
 Link to external system.
- Parameters:
 operator (airflow.models.BaseOperator) – The Airflow operator object this link is associated to.
ti_key (airflow.models.taskinstance.TaskInstanceKey | None) – TaskInstance ID to return link for.
- Returns:
 link to external system
- Return type:
 
- airflow.providers.databricks.plugins.databricks_workflow.store_databricks_job_run_link(context, metadata, logger)[source]¶
 Store the Databricks job run link in XCom during task execution.
This should be called by Databricks operators during their execution.
- class airflow.providers.databricks.plugins.databricks_workflow.WorkflowJobRepairAllFailedLink(context=None)[source]¶
 Bases:
airflow.providers.common.compat.sdk.BaseOperatorLink,airflow.utils.log.logging_mixin.LoggingMixinConstructs a link to send a request to repair all failed tasks in the Databricks workflow.
- name = 'Repair All Failed Tasks'[source]¶
 Name of the link. This will be the button name on the task UI.
- get_link(operator, dttm=None, *, ti_key=None)[source]¶
 Link to external system.
- Parameters:
 operator – The Airflow operator object this link is associated to.
ti_key (airflow.models.taskinstance.TaskInstanceKey | None) – TaskInstance ID to return link for.
- Returns:
 link to external system
- Return type:
 
- class airflow.providers.databricks.plugins.databricks_workflow.WorkflowJobRepairSingleTaskLink(context=None)[source]¶
 Bases:
airflow.providers.common.compat.sdk.BaseOperatorLink,airflow.utils.log.logging_mixin.LoggingMixinConstruct a link to send a repair request for a single databricks task.
- name = 'Repair a single task'[source]¶
 Name of the link. This will be the button name on the task UI.
- get_link(operator, dttm=None, *, ti_key=None)[source]¶
 Link to external system.
- Parameters:
 operator – The Airflow operator object this link is associated to.
ti_key (airflow.models.taskinstance.TaskInstanceKey | None) – TaskInstance ID to return link for.
- Returns:
 link to external system
- Return type:
 
- class airflow.providers.databricks.plugins.databricks_workflow.DatabricksWorkflowPlugin[source]¶
 Bases:
airflow.plugins_manager.AirflowPluginDatabricks Workflows plugin for Airflow.
See also
For more information on how to use this plugin, take a look at the guide: DatabricksWorkflowPlugin