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(