Replies: 1 comment
-
In Dagster, each asset within a single But you could programmatically create the assets with the respective from dagster import DailyPartitionsDefinition, asset
id_map = {
"a": "2020-01-01",
"b": "2021-01-01",
}
assets = []
for id, start_date in id_map.items():
partitions_def = DailyPartitionsDefinition(start_date=start_date)
@asset(name=f"{id}_asset", partitions_def=partitions_def)
def dynamic_asset(context):
today = context.partition_key
return today
assets.append(dynamic_asset) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following definitions:
How can I create assets with different partition definitions here? Ideally, we could do:
What are possible options? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions