airflow.providers.airbyte.hooks.airbyte

Module Contents

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

Bases: airflow.providers.http.hooks.http.HttpHook

Hook for Airbyte API

Parameters
  • airbyte_conn_id (str) -- Required. The name of the Airflow connection to get connection information for Airbyte.

  • api_version (str) -- Optional. Airbyte API version.

RUNNING = running[source]
SUCCEEDED = succeeded[source]
CANCELLED = cancelled[source]
PENDING = pending[source]
FAILED = failed[source]
ERROR = error[source]
wait_for_job(self, job_id: str, wait_seconds: Optional[float] = 3, timeout: Optional[float] = 3600)[source]

Helper method which polls a job to check if it finishes.

Parameters
  • job_id (str) -- Required. Id of the Airbyte job

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

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

submit_sync_connection(self, connection_id: str)[source]

Submits a job to a Airbyte server.

Parameters

connection_id -- Required. The ConnectionId of the Airbyte Connection.

get_job(self, job_id: int)[source]

Gets the resource representation for a job in Airbyte.

Parameters

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

Was this entry helpful?