| :py:mod:`airflow.providers.databricks.triggers.databricks` |
| ========================================================== |
| |
| .. py:module:: airflow.providers.databricks.triggers.databricks |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.databricks.triggers.databricks.DatabricksExecutionTrigger |
| |
| |
| |
| |
| Attributes |
| ~~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.databricks.triggers.databricks.BaseTrigger |
| |
| |
| .. py:data:: BaseTrigger |
| |
| |
| |
| |
| .. py:class:: DatabricksExecutionTrigger(run_id, databricks_conn_id, polling_period_seconds = 30) |
| |
| Bases: :py:obj:`airflow.triggers.base.BaseTrigger` |
| |
| The trigger handles the logic of async communication with DataBricks API. |
| |
| :param run_id: id of the run |
| :param databricks_conn_id: Reference to the :ref:`Databricks connection <howto/connection:databricks>`. |
| :param polling_period_seconds: Controls the rate of the poll for the result of this run. |
| By default, the trigger will poll every 30 seconds. |
| |
| .. py:method:: serialize(self) |
| |
| Returns the information needed to reconstruct this Trigger. |
| |
| :return: Tuple of (class path, keyword arguments needed to re-instantiate). |
| |
| |
| .. py:method:: run(self) |
| :async: |
| |
| Runs the trigger in an asynchronous context. |
| |
| The trigger should yield an Event whenever it wants to fire off |
| an event, and return None if it is finished. Single-event triggers |
| should thus yield and then immediately return. |
| |
| If it yields, it is likely that it will be resumed very quickly, |
| but it may not be (e.g. if the workload is being moved to another |
| triggerer process, or a multi-event trigger was being used for a |
| single-event task defer). |
| |
| In either case, Trigger classes should assume they will be persisted, |
| and then rely on cleanup() being called when they are no longer needed. |
| |
| |
| |