astronomer.providers.core.hooks.astro

Module Contents

Classes

AstroHook

Custom Apache Airflow Hook for interacting with Astro Cloud API.

class astronomer.providers.core.hooks.astro.AstroHook(astro_cloud_conn_id='astro_cloud_conn_id')[source]

Bases: airflow.hooks.base.BaseHook

Custom Apache Airflow Hook for interacting with Astro Cloud API.

Parameters:

astro_cloud_conn_id (str) – The connection ID to retrieve Astro Cloud credentials.

conn_name_attr = 'astro_cloud_conn_id'
default_conn_name = 'astro_cloud_default'
conn_type = 'Astro Cloud'
hook_name = 'Astro Cloud'
classmethod get_ui_field_behaviour()[source]

Returns UI field behavior customization for the Astro Cloud connection.

This method defines hidden fields, relabeling, and placeholders for UI display.

get_conn()[source]

Retrieves the Astro Cloud connection details.

get_dag_runs(external_dag_id)[source]

Retrieves information about running or queued DAG runs.

Parameters:

external_dag_id (str) – External ID of the DAG.

get_dag_run(external_dag_id, dag_run_id)[source]

Retrieves information about a specific DAG run.

Parameters:
  • external_dag_id (str) – External ID of the DAG.

  • dag_run_id (str) – ID of the DAG run.

async get_a_dag_run(external_dag_id, dag_run_id)[source]

Retrieves information about a specific DAG run.

Parameters:
  • external_dag_id (str) – External ID of the DAG.

  • dag_run_id (str) – ID of the DAG run.

get_task_instance(external_dag_id, dag_run_id, external_task_id)[source]

Retrieves information about a specific task instance within a DAG run.

Parameters:
  • external_dag_id (str) – External ID of the DAG.

  • dag_run_id (str) – ID of the DAG run.

  • external_task_id (str) – External ID of the task.

async get_a_task_instance(external_dag_id, dag_run_id, external_task_id)[source]

Retrieves information about a specific task instance within a DAG run.

Parameters:
  • external_dag_id (str) – External ID of the DAG.

  • dag_run_id (str) – ID of the DAG run.

  • external_task_id (str) – External ID of the task.