airflow.providers.airbyte.hooks.airbyte

Attributes

T

Classes

AirbyteHook

Hook for Airbyte API.

Module Contents

airflow.providers.airbyte.hooks.airbyte.T[source]
class airflow.providers.airbyte.hooks.airbyte.AirbyteHook(airbyte_conn_id='airbyte_default', api_version='v1')[source]

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

Hook for Airbyte API.

Parameters:
  • airbyte_conn_id (str) – Optional. The name of the Airflow connection to get connection information for Airbyte. Defaults to “airbyte_default”.

  • api_version (str) – Optional. Airbyte API version. Defaults to “v1”.

conn_name_attr = 'airbyte_conn_id'[source]
default_conn_name = 'airbyte_default'[source]
conn_type = 'airbyte'[source]
hook_name = 'Airbyte'[source]
api_version: str = 'v1'[source]
airbyte_conn_id = 'airbyte_default'[source]
conn[source]
airbyte_api[source]
get_conn_params(conn_id)[source]
create_api_session()[source]

Create Airbyte API session.

When client_id and client_secret are provided (via the connection’s Login and Password fields), the SDK authenticates with OAuth2 Client Credentials — required for Airbyte Cloud and Enterprise deployments.

When credentials are not provided, the session is created without authentication. This is the correct mode for Airbyte OSS deployments that do not have the /v1/applications/token endpoint enabled.

classmethod get_ui_field_behaviour()[source]

Return custom field behaviour.

get_job_details(job_id)[source]

Use Http async call to retrieve metadata for a specific job of an Airbyte Sync.

Parameters:

job_id (int) – The ID of an Airbyte Sync Job.

get_job_status(job_id)[source]

Retrieve the status for a specific job of an Airbyte Sync.

Parameters:

job_id (int) – The ID of an Airbyte Sync Job.

wait_for_job(job_id, wait_seconds=3, timeout=3600)[source]

Poll a job to check if it finishes.

Parameters:
  • job_id (str | int) – Required. Id of the Airbyte job

  • wait_seconds (float) – Optional. Number of seconds between checks.

  • timeout (float | None) – Optional. How many seconds wait for job to be ready. Used only if asynchronous is False.

submit_sync_connection(connection_id)[source]
submit_reset_connection(connection_id)[source]
cancel_job(job_id)[source]

Cancel the job when task is cancelled.

Parameters:

job_id (int) – Required. Id of the Airbyte job

test_connection()[source]

Tests the Airbyte connection by hitting the health API.

Was this entry helpful?