https://dagster.io/ logo
Title
a

Adam Ma'ruf

11/06/2022, 4:58 PM
We're considering adopting the software-defined asset paradigm in more of our dagster jobs. Is it possible for op/graph-based jobs to depend on software defined assets that are defined in the same repo? If so, how would one access the latest materialization of a SWD asset from an op in an op/graph-based job
q

Qwame

11/06/2022, 8:24 PM
I know there's
get_asset_value_loader
but there's no much documentation on this. https://docs.dagster.io/_apidocs/repositories#dagster.RepositoryDefinition.get_asset_value_loader Also, I feel like repositories load assets and having assets load the repository back to call the get asset value loader function is likely to cause circular dependencies. I may be wrong but that's how I see it
y

yuhan

11/08/2022, 4:13 AM
I think
load_asset_value
/
get_asset_value_loader
is the recommendation here. i wouldn’t worry too much about the circular dependencies unless the op-based job is also going to materialize the same asset. but even if so, if you’d like to avoid that risk at all, you can kick off the op-based job using asset sensors, i.e. explicitly make the job depend on that asset.
👍 1
:thank-you-box: 1
c

Casper Weiss Bang

02/02/2023, 7:31 AM
is it still best to use
load_asset_value
to have an op/graph depend on an asset?