You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an upstream asset partitioned with a DynamicPartitionsDefinition.
In my downstream asset, I'd like to get a list of all the partition keys from the upstream asset. The problem I'm running into is an error message from dagster saying "The input has no asset partitions".
Example code:
unique_id_partitions=dg.DynamicPartitionsDefinition(name="unique_id_partitions")
@dg.asset(name="Upstream Asset",partitions_def=unique_id_partitions,)defupstream_asset(context):
context.log("This is the upstream asset.")
# < sensor and job here to create run requests for upstream_asset with unique ID for partition based on some external data >@dg.asset(name="Downstream Asset",deps=[upstream_asset],)defdownstream_asset(context):
# This line causes the error:unique_ids=context.asset_partition_keys_for_input("upstream_asset")
Running dagster locally with version 1.10.19.
I'm able to workaround this by using a different approach:
But I'm wondering why the first approach doesn't work right? Does the upstream asset need to be an arg input to the downstream asset instead of non arg deps?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have an upstream asset partitioned with a
DynamicPartitionsDefinition
.In my downstream asset, I'd like to get a list of all the partition keys from the upstream asset. The problem I'm running into is an error message from dagster saying "The input has no asset partitions".
Example code:
Running dagster locally with version 1.10.19.
I'm able to workaround this by using a different approach:
But I'm wondering why the first approach doesn't work right? Does the upstream asset need to be an arg input to the downstream asset instead of non arg deps?
Beta Was this translation helpful? Give feedback.
All reactions