airflow.providers.databricks.operators.agent

Operators for invoking Databricks agents.

Classes

DatabricksAgentInvokeOperator

Invoke a DurableAgentServer on Databricks Apps and optionally wait for its result.

Module Contents

class airflow.providers.databricks.operators.agent.DatabricksAgentInvokeOperator(*, app_url, input, databricks_conn_id='databricks_default', session_id=None, invocation_id=None, wait_for_termination=True, polling_period_seconds=10, timeout=3600, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.common.compat.sdk.BaseOperator

Invoke a DurableAgentServer on Databricks Apps and optionally wait for its result.

Parameters:
  • app_url (str) – HTTPS base URL of the deployed app. (templated)

  • input (Any) – JSON-serializable agent input. (templated)

  • databricks_conn_id (str) – Databricks connection using service principal OAuth or OAuth token federation. Defaults to databricks_default. (templated)

  • session_id (str | None) – Conversation ID. CLI template agents require this field. Defaults to None. (templated)

  • invocation_id (str | None) – Idempotency UUID. Defaults to a stable UUID for this task instance, app URL, input and session, shared across retries and clears with unchanged input and session. A stored failure requires a new UUID to run again. (templated)

  • wait_for_termination (bool) – Wait for completion or interruption. If false, return the submission response. Defaults to True.

  • polling_period_seconds (float) – Seconds between status checks. Defaults to 10.

  • timeout (float) – Maximum seconds to wait after submission. Timing out does not cancel the remote invocation. Defaults to 3600.

  • deferrable (bool) – Release the worker while waiting. Defaults to [operators] default_deferrable, with a fallback of False.

template_fields: collections.abc.Sequence[str] = ('app_url', 'input', 'databricks_conn_id', 'session_id', 'invocation_id')[source]
template_fields_renderers[source]
ui_color = '#1CB1C2'[source]
ui_fgcolor = '#fff'[source]
app_url[source]
input[source]
databricks_conn_id = 'databricks_default'[source]
session_id = None[source]
invocation_id = None[source]
wait_for_termination = True[source]
polling_period_seconds = 10[source]
timeout = 3600[source]
deferrable[source]
property hook: airflow.providers.databricks.hooks.agent.DatabricksAgentHook[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

execute_complete(context, event=None, *, invocation_id)[source]

Was this entry helpful?