Hi, I'm curious about the example codes in <https:...
# ask-community
l
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
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
Thanks a lot for the detailed explanation.
🌈 1