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

Rasmus Hallén

07/06/2022, 1:04 PM
Hi, im trying to define a job that looks like this:
Copy code
materialize_bsf_schoollist = define_asset_job(
    name="materialize_bsf_schoollist",
    selection=AssetSelection.keys(
       ["bsf", "procapita", "df_final_schoollist"]
    ).downstream())
But in dagit, no downstream assets are selected as seen in the first screenshot. All the source assets are materializing correctly and are visibile if i click the asset in the overview. However, if I change the code:
Copy code
materialize_bsf_schoollist = define_asset_job(
    name="materialize_bsf_schoollist",
    selection=AssetSelection.groups(
       "transform"
    ))
Then the assets are selected as they all are in the same group (shown in second screenshot).
second screen:
I would expect that downstream() selects all source assets of the key im passing (["bsf", "procapita", "df_final_schoollist"] in my case), am I doing anything wierd?
o

owen

07/06/2022, 4:08 PM
hi @Rasmus Hallén! The "downstream" asset selection means "assets that are descendants of the asset", so the behavior you're seeing looks correct (as it doesn't seem like there are any assets that use df_schoollist as an input). To get the assets that are parents of df_schoollist, you can use
.upstream()
r

Rasmus Hallén

07/07/2022, 9:05 AM
Ahh of course, haha! Cheers!