Replies: 1 comment 8 replies
-
You are on the right track. The difference between the dlt_assets and the dlt resources is one produces a declaration of assets that this dlt pipeline would create. And yes it is a multi assets under the hood, where the specifications of the assets are produced by an utility function called build_dlt_asset_specs from the dlt source and pipeline and using the custom translator if you provided one. You can see that here: https://github.com/dagster-io/dagster/blob/master/python_modules/libraries/dagster-embedded-elt/dagster_embedded_elt/dlt/asset_decorator.py#L151. You can think of the dlt resource as the handle to the tool itself to perform the execution. Assets declaration serves two purposes:
|
Beta Was this translation helpful? Give feedback.
-
I have a question about difference of
@dlt_assets
and instance ofDagsterDltResource
.I don't know well how they work under the hood . I have an asset which accepts @dlt_assets decorator. In body of function, I can
yield
thedlt_resource.run()
and pass the same parameters I passed into@dlt_assets
decorator.I prefer to use
dlt_resource.run()
, because there I can provide necessary parameters to dlt Source and Pipeline. But it seems the@dlt_assets
part launches.If I replace decorator to
@asset
, the part ofdlt_resource.run()
, during a run I get an error that the asset is not found in definitions. So I think, it's a problem related tomulti_asset
mechanism.I am looking for a way to pass parameters to
@dlt_assets
dynamically from the upstream asset. Currently, it only works if statically define parameters.Thanks for your time to read this!
The code snippet with both
DagsterDltResource
and@dlt_assets
:Beta Was this translation helpful? Give feedback.
All reactions