airflow.providers.databricks.triggers.agent¶
Triggers for Databricks agent invocations.
Classes¶
Wait for an agent invocation to complete, fail or request human input. |
Module Contents¶
- class airflow.providers.databricks.triggers.agent.DatabricksAgentInvocationTrigger(*, app_url, invocation_id, databricks_conn_id='databricks_default', session_id=None, polling_period_seconds=10)[source]¶
Bases:
airflow.triggers.base.BaseTriggerWait for an agent invocation to complete, fail or request human input.
- Parameters:
app_url (str) – HTTPS base URL of the deployed app.
invocation_id (str) – UUID identifying the invocation to poll.
databricks_conn_id (str) – Databricks connection using service principal OAuth or OAuth token federation. Defaults to
databricks_default.session_id (str | None) – Conversation ID sent as the routing key. Defaults to
None.polling_period_seconds (float) – Seconds between status checks. Defaults to
10.
- async run()[source]¶
Run 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.