Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dagster-fivetran] Remove OpExecutionContext support in FivetranWorkspace.sync_and_poll #26585

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
InitResourceContext,
MaterializeResult,
MetadataValue,
OpExecutionContext,
__version__,
_check as check,
get_dagster_logger,
Expand Down Expand Up @@ -1014,14 +1013,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
Expand All @@ -1031,7 +1030,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(
Expand Down