Skip to content

Commit

Permalink
[dagster-fivetran] Remove OpExecutionContext support in FivetranWorks…
Browse files Browse the repository at this point in the history
…pace.sync_and_poll
  • Loading branch information
maximearmstrong committed Dec 20, 2024
1 parent baefba6 commit ad4f7c5
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit ad4f7c5

Please sign in to comment.