Hey is it possible to configuration certain aspect...
# ask-community
j
Hey is it possible to configuration certain aspect of an IO Manager in the asset a other parameters in the Definition of the ressources itself? I would love do configure the bucket name like this
Copy code
RESOURCES_SANDBOX = {
    "new_s3_io_manager": s3_csv_io_manager.configured(
        {
            's3_bucket': "my-aws-bucket",
        }
    ),
}
And then in the asset configure other parameters like
Copy code
@asset(
      io_manager_key="new_s3_io_manager",
      parameters = {'my_io_manager_format': 'xyz', 'my_io_partition_prefix_file_name': 'this_is_my_prefix'}
)
🤖 1
s
Hi Jacob, it’s not possible to directly configure the IO manager via the asset definition. However, if you write a custom IO manager you can access
metadata
defined on the asset via the
OutputContext
-- we do this in `DbIOManager`: https://github.com/dagster-io/dagster/blame/master/python_modules/dagster/dagster/_core/storage/db_io_manager.py You could use this to implement something like you’re looking for,
parameters
would need to be formatted as asset metadata. That said, it’s not a well-supported pattern so I would avoid unless you really want to experiment.