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

Harry James

08/17/2022, 10:42 AM
Hi all! Was wondering if anyone could point me in the right direction to achieve this. Essentially, get all upstream assets and pass these to materialize
Copy code
@asset
def asset_1():
    return "x"


@asset
def asset_2(asset_1):
    return asset_1


materialize_to_memory(AssetSelection.assets(asset_2).upstream())
🤖 1
s

sandy

08/17/2022, 6:09 PM
hey @Harry James - this is a little bit clunky right now, but I wrote some code here that demonstrates how to do it: https://github.com/dagster-io/dagster/discussions/9413 I also filed an issue to make it easier: https://github.com/dagster-io/dagster/issues/9414
❤️ 1
h

Harry James

08/18/2022, 8:28 AM
@sandy that is most helpful thank you!