Erwin Kuhn
01/18/2023, 6:43 PMload_input
properly.
In the case where a partitioned asset materialization is loading a non-partitioned asset, it seems like InputContext.partition_key
is still set to the partition key of the materialization. Does that mean I cannot deduce from the context passed to load_input
whether the upstream asset is partitioned or not?UPathIOManager
, which is the base class for the fs_io_manager
, it seems like looking at context.has_asset_partitions
and context.asset_partition_keys
is the way to go:
https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/storage/upath_io_manager.py#L134-L205