We're considering adopting the software-defined as...
# ask-community
a
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
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
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
is it still best to use
load_asset_value
to have an op/graph depend on an asset?