diff --git a/python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt/dlt/asset_decorator.py b/python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt/dlt/asset_decorator.py index b203d42ed8f29..77dc256e9358d 100644 --- a/python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt/dlt/asset_decorator.py +++ b/python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt/dlt/asset_decorator.py @@ -3,6 +3,7 @@ from dagster import ( AssetsDefinition, AssetSpec, + _check as check, multi_asset, ) from dlt.extract.source import DltSource @@ -18,7 +19,7 @@ def dlt_assets( dlt_pipeline: Pipeline, name: Optional[str] = None, group_name: Optional[str] = None, - dlt_dagster_translator: DagsterDltTranslator = DagsterDltTranslator(), + dlt_dagster_translator: Optional[DagsterDltTranslator] = None, ) -> Callable[[Callable[..., Any]], AssetsDefinition]: """Asset Factory for using data load tool (dlt). @@ -76,6 +77,10 @@ def github_reactions_dagster_assets(context: AssetExecutionContext, dlt: DltDags yield from dlt.run(context=context) """ + dlt_dagster_translator = ( + check.opt_inst_param(dlt_dagster_translator, "dlt_dagster_translator", DagsterDltTranslator) + or DagsterDltTranslator() + ) return multi_asset( name=name, group_name=group_name,