https://dagster.io/ logo
#ask-community
Title
# ask-community
l

li liang

08/06/2022, 4:57 AM
Hi, I'm curious about the example codes in https://docs.dagster.io/guides/dagster/enriching-with-software-defined-assets. Why is there a job definition in repository when using ops, but when using assets, the repository return assets directly? If there are some reasons, the job definition is useless when using software defined assets?
c

claire

08/08/2022, 2:46 PM
Hi Li. The reason that assets can be attached directly to a repository is so that they can be materialized independently without being bound to a job. In addition, assets usually store outputs in persistent storage, so a dependent asset can be executed independently by reading from the upstream assets’ persistent storage. In contrast, ops accept inputs and outputs from one another and may not necessarily output to persistent storage so are usually executed together in a job.
What do you mean by the job definition is useless? If you mean an instance of UnresolvedAssetJobDefinition, you can call unresolved_job.resolve and pass in the assets for an executable job.
l

li liang

08/09/2022, 6:05 AM
Thanks a lot for the detailed explanation.
🌈 1
3 Views