From ad4f7c5241737bfd247b91112307fae25a27dd5e Mon Sep 17 00:00:00 2001 From: Maxime Armstrong Date: Wed, 18 Dec 2024 23:10:25 -0500 Subject: [PATCH] [dagster-fivetran] Remove OpExecutionContext support in FivetranWorkspace.sync_and_poll --- .../dagster-fivetran/dagster_fivetran/resources.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py b/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py index 82b36a45ad1bd..62e439e0b1dfb 100644 --- a/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py +++ b/python_modules/libraries/dagster-fivetran/dagster_fivetran/resources.py @@ -1014,14 +1014,14 @@ def _generate_materialization( ) def sync_and_poll( - self, context: Union[OpExecutionContext, AssetExecutionContext] + self, context: AssetExecutionContext ) -> FivetranEventIterator[Union[AssetMaterialization, MaterializeResult]]: """Executes a sync and poll process to materialize Fivetran assets. + This method can only be used in the context of an asset execution. Args: - context (Union[OpExecutionContext, AssetExecutionContext]): The execution context - from within `@fivetran_assets`. If an AssetExecutionContext is passed, - its underlying OpExecutionContext will be used. + context (AssetExecutionContext): The execution context + from within `@fivetran_assets`. Returns: Iterator[Union[AssetMaterialization, MaterializeResult]]: An iterator of MaterializeResult @@ -1031,7 +1031,7 @@ def sync_and_poll( events=self._sync_and_poll(context=context), fivetran_workspace=self, context=context ) - def _sync_and_poll(self, context: Union[OpExecutionContext, AssetExecutionContext]): + def _sync_and_poll(self, context: AssetExecutionContext): assets_def = context.assets_def dagster_fivetran_translator = get_translator_from_fivetran_assets(assets_def) connector_id = next(