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

Navid Amin

07/10/2023, 4:07 PM
Hi, When using the define_asset_job class how would I go about using only assets from 1 file for the selection argument? For example, I have assets_file1 and assets_file2 and I want job1 to contain only the assets from assets_file1 and job2 to contain only the assets_file2 assets. Is there any way to do it using the AssetSelection class or would I just have to use load_asset_from_modules?
c

chris

07/10/2023, 5:13 PM
You could do this using key_prefixes perhaps - in each of those files, have a different key prefix, then use
AssetSelection.key_prefixes
2 Views