Chris Histe
06/28/2023, 3:03 PM_context_.asset_partition_key_range
and then return an array for each key? e.g range if the range is ['2023-06-20', '2023-06-21', '2023-06-22']
the asset would return 'hello', 'dagster', 'world'
If that’s correct what do you recommend doing in an IO Manager to prevent end users errors?
• Check the length of the partition range is the same as the output?
• Ask the end user to return a key value dictionary with the shape: range_key: value
like
{
"2023-06-20": "hello",
"2023-06-21": "dagster",
"2023-06-22": "world"
}
• Else?
Thanks in advance, and sorry I couldn’t find docs regarding this.Brendan Jackson
06/28/2023, 3:05 PMsean
06/28/2023, 3:07 PMPartitionedOutput
) that you will return: https://github.com/dagster-io/dagster/pull/14621sean
06/28/2023, 3:08 PMwhat do you recommend doing in an IO Manager to prevent end users errors?Just validate whatever structure you’re expecting, as with the dictionary example you provided.
Chris Histe
06/28/2023, 3:09 PMChris Histe
06/28/2023, 5:46 PMsean
06/28/2023, 5:48 PMDo I understand correctly that I need my IO Manager to collect all 5 partitions and then wrap it in an array that will become the input of the downstream?Yes, although it doesn’t need to be an array, you can return any value. I believe our default
UPathIOManager
returns a dict keyed by partition key.
Is there a way to call the IO Manager X amount of times and return each partitions as a separate input argumentThere is presently no way to do this.
Chris Histe
06/28/2023, 5:49 PM