| :mod:`airflow.providers.airbyte.hooks.airbyte` |
| ============================================== |
| |
| .. py:module:: airflow.providers.airbyte.hooks.airbyte |
| |
| |
| Module Contents |
| --------------- |
| |
| .. py:class:: AirbyteHook(airbyte_conn_id: str = 'airbyte_default', api_version: Optional[str] = 'v1') |
| |
| Bases: :class:`airflow.providers.http.hooks.http.HttpHook` |
| |
| Hook for Airbyte API |
| |
| :param airbyte_conn_id: Required. The name of the Airflow connection to get |
| connection information for Airbyte. |
| :type airbyte_conn_id: str |
| :param api_version: Optional. Airbyte API version. |
| :type api_version: str |
| |
| .. attribute:: conn_name_attr |
| :annotation: = airbyte_conn_id |
| |
| |
| |
| .. attribute:: default_conn_name |
| :annotation: = airbyte_default |
| |
| |
| |
| .. attribute:: conn_type |
| :annotation: = airbyte |
| |
| |
| |
| .. attribute:: hook_name |
| :annotation: = Airbyte |
| |
| |
| |
| .. attribute:: RUNNING |
| :annotation: = running |
| |
| |
| |
| .. attribute:: SUCCEEDED |
| :annotation: = succeeded |
| |
| |
| |
| .. attribute:: CANCELLED |
| :annotation: = cancelled |
| |
| |
| |
| .. attribute:: PENDING |
| :annotation: = pending |
| |
| |
| |
| .. attribute:: FAILED |
| :annotation: = failed |
| |
| |
| |
| .. attribute:: ERROR |
| :annotation: = error |
| |
| |
| |
| |
| .. method:: wait_for_job(self, job_id: str, wait_seconds: Optional[float] = 3, timeout: Optional[float] = 3600) |
| |
| Helper method which polls a job to check if it finishes. |
| |
| :param job_id: Required. Id of the Airbyte job |
| :type job_id: str |
| :param wait_seconds: Optional. Number of seconds between checks. |
| :type wait_seconds: float |
| :param timeout: Optional. How many seconds wait for job to be ready. |
| Used only if ``asynchronous`` is False. |
| :type timeout: float |
| |
| |
| |
| |
| .. method:: submit_sync_connection(self, connection_id: str) |
| |
| Submits a job to a Airbyte server. |
| |
| :param connection_id: Required. The ConnectionId of the Airbyte Connection. |
| :type connection_id: str |
| |
| |
| |
| |
| .. method:: get_job(self, job_id: int) |
| |
| Gets the resource representation for a job in Airbyte. |
| |
| :param job_id: Required. Id of the Airbyte job |
| :type job_id: int |
| |
| |
| |
| |
| .. method:: test_connection(self) |
| |
| Tests the Airbyte connection by hitting the health API |
| |
| |
| |
| |