Currently the `DBIOManager` has the following limi...
# dagster-feedback
d
Currently the
DBIOManager
has the following limitations: 1. If the schema is specified in the IOManager config, the asset can't have a prefix:
Copy code
if len(asset_key_path) > 1 and self._schema:
                raise DagsterInvalidDefinitionError(
                    f"Asset {asset_key_path} specifies a schema with "
                    f"its key prefixes {asset_key_path[:-1]}, but schema  "
                    f"{self._schema} was also provided via run config. "
                    "Schema can only be specified one way."
                )
2. If the schema is specified with the asset metadata, the IOManager can't have it configured:
Copy code
if output_context_metadata.get("schema") and self._schema:
                raise DagsterInvalidDefinitionError(
                    f"Schema {output_context_metadata.get('schema')} "
                    "specified via output metadata, but conflicting schema "
                    f"{self._schema} was provided via run_config. "
                    "Schema can only be specified one way."
                )
May I ask why? It seems to me like the overrides hierarchy is really clear: the asset metadata is the lowest level (and should have the highest priority), then goes the asset prefix, then goes the IOManager itself. Usually a lot of assets may share the IOManager, a subset of them may share the prefix, and the metadata is only defined for specific assets. Right now I can't use asset prefixes with a configured IOManager. I would really like to have prefixes and allow them to override the configured IOManager schema. Consider removing this limitations. None of the current code would break because if this change.
🤖 1
s
Hey Daniel, Thanks for writing this up. There probably isn’t a good reason for this, and I can look into fixing it. Would you mind more-or-less copying this over to a GH issue?
d
Ok, great!