Peter Law
07/18/2023, 5:14 PMPeter Law
07/18/2023, 5:16 PMPeter Law
07/18/2023, 5:18 PMPeter Law
07/18/2023, 5:18 PMZach
07/18/2023, 5:20 PMPeter Law
07/18/2023, 5:23 PMFilesystemIOManager
(https://github.com/dagster-io/dagster/blob/9eabe0e101a4e2efd071040844c44710d186e0c[…]c/python_modules/dagster/dagster/_core/storage/fs_io_manager.py):
Assigns each op output to a unique filepath containing run ID, step key, and output name.
Assigns each asset to a single filesystem path, at "<base_dir>/<asset_key>". If the asset key has multiple components, the final component is used as the name of the file, and the preceding components as parent directories under the base_dir.So I think I'd assumed that that was meant to be happening already. If that's not the default behaviour how/where would a custom implementation get the run id from? Is it available as a resource or something? Apologies if I'm missing something obvious in the docs.
Peter Law
07/18/2023, 5:25 PMOutputContext
given to the dump_to_path
contains the run id?Zach
07/18/2023, 5:26 PMPeter Law
07/18/2023, 5:28 PMpath
passed in some templateable way, rather than needing implement a custom IO manager for something like this. Kinda feels like this is a slightly different layer than the IO manager (and I might want to apply the same/similar template to various managers in various code locations).Zach
07/18/2023, 5:33 PMPeter Law
07/18/2023, 5:35 PMget_asset_relative_path
and get_op_output_relative_path
it seems the latter is a bit closer to what I was perhaps expecting (context.get_identifier()
seems to include the run id etc.). I wonder if there's a reason they're different?Zach
07/18/2023, 5:38 PMPeter Law
07/19/2023, 3:29 PMInputContent
to construct the path to the previous output asset. While there is an upstream_output
member which is an OutputContext
, that context doesn't have key information (namely the run id) which would be needed to construct the proper path.
In generality -- I don't know how subsequent runs will know what the proper path is to the previous version of the asset.Zach
07/19/2023, 3:33 PMZach
07/19/2023, 3:34 PMPeter Law
07/19/2023, 3:38 PMZach
07/19/2023, 3:41 PMPeter Law
07/19/2023, 3:43 PMZach
07/19/2023, 3:46 PMPeter Law
07/19/2023, 4:02 PM