From 070cb6238974506eace6432cf9a058faa04b5ad1 Mon Sep 17 00:00:00 2001 From: Maxime Armstrong Date: Wed, 18 Dec 2024 22:42:31 -0500 Subject: [PATCH] [dagster-airbyte][docs] Update airbyte API docs with asset decorator, factory and materialization method --- .../sphinx/sections/api/apidocs/libraries/dagster-airbyte.rst | 4 ++++ .../libraries/dagster-airbyte/dagster_airbyte/asset_defs.py | 2 ++ .../libraries/dagster-airbyte/dagster_airbyte/resources.py | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/sections/api/apidocs/libraries/dagster-airbyte.rst b/docs/sphinx/sections/api/apidocs/libraries/dagster-airbyte.rst index b9a4dc1299f85..911d244fb2c4d 100644 --- a/docs/sphinx/sections/api/apidocs/libraries/dagster-airbyte.rst +++ b/docs/sphinx/sections/api/apidocs/libraries/dagster-airbyte.rst @@ -17,6 +17,10 @@ Assets (Airbyte API) .. autofunction:: load_airbyte_cloud_asset_specs +.. autodecorator:: airbyte_assets + +.. autofunction:: build_airbyte_assets_definitions + Legacy ====== diff --git a/python_modules/libraries/dagster-airbyte/dagster_airbyte/asset_defs.py b/python_modules/libraries/dagster-airbyte/dagster_airbyte/asset_defs.py index 6f2e2b9caa80a..60edf7dc425cd 100644 --- a/python_modules/libraries/dagster-airbyte/dagster_airbyte/asset_defs.py +++ b/python_modules/libraries/dagster-airbyte/dagster_airbyte/asset_defs.py @@ -1062,6 +1062,7 @@ def build_airbyte_assets_definitions( Examples: Sync the tables of a Airbyte connection: + .. code-block:: python from dagster_airbyte import AirbyteCloudWorkspace, build_airbyte_assets_definitions @@ -1083,6 +1084,7 @@ def build_airbyte_assets_definitions( ) Sync the tables of a Airbyte connection with a custom translator: + .. code-block:: python from dagster_airbyte import ( diff --git a/python_modules/libraries/dagster-airbyte/dagster_airbyte/resources.py b/python_modules/libraries/dagster-airbyte/dagster_airbyte/resources.py index 3bd3e4e36de6e..210cc1d1b16b3 100644 --- a/python_modules/libraries/dagster-airbyte/dagster_airbyte/resources.py +++ b/python_modules/libraries/dagster-airbyte/dagster_airbyte/resources.py @@ -21,7 +21,7 @@ get_dagster_logger, resource, ) -from dagster._annotations import experimental +from dagster._annotations import experimental, public from dagster._config.pythonic_config import infer_schema_from_config_class from dagster._core.definitions.asset_spec import AssetSpec from dagster._core.definitions.definitions_load_context import StateBackedDefinitionsLoader @@ -1258,6 +1258,7 @@ def _generate_materialization( metadata=stream_asset_spec.metadata, ) + @public @experimental def sync_and_poll(self, context: AssetExecutionContext): """Executes a sync and poll process to materialize Airbyte Cloud assets.