How do `multi_assets` work with `config_schema` ?...
# ask-community
e
How do
multi_assets
work with
config_schema
? Can't find anything on the multi_asset page
dagster bot responded by community 1
z
I think they work the same way as a normal asset or op. Multi-assets are basically just a normal asset except that they might produce multiple asset outputs.
e
Yeah I noticed this, thanks for confirming. It seems that multi_assets do not support separate config_schemas for each asset. I can see the benefit of this, but when you have a duplicated schema that you would like to specify separately for each asset, it can be a bit cumbersome
z
yeah in that case I'd go with an asset factory to generate the duplicate assets
e
Not duplicate assets, just duplicate config schemas. Each asset is distinct but relies on a shared set of class instances, hence the usefulness of the
multi_asset
z
I see. Conceptually it would make more sense to me to define those as separate assets and just share the config schema through a variable. But there's more than one way to slice a sandwich I suppose
e
The challenge with separate assets is that they rely on a shared set of class instances for their logic. These can't be passed into each asset because they cannot be serialized for io, and they shouldn't be initialized separately in each asset because they are potentially slow and costly to initialize