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

andi.d

01/18/2023, 4:23 PM
Hi everyone, is it possible to construct dagster assets programatically? E.g. something like for name in ["Germany", "US"]: @asset def name(): return name @repository def dagster_ops(): return ["Germany", "US"]
r

Rasmus Bonnevie

01/18/2023, 4:31 PM
You can construct the assets in a loop or with a function, but you need to the parameters of
asset
to make sure they get different asset keys and to control inputs if any.
s

sandy

01/18/2023, 5:12 PM
a

andi.d

01/18/2023, 8:50 PM
perfect. That is what I was looking for. Thank you very much!