Why does every environment require a default data_source?
Embeddable requires each environment to have a default data_source due to how the underlying data modelling layer (Cube.js) resolves queries. This is an implementation detail and is not a configuration requirement in most cases.
How is the default data_source chosen?
When an environment is created, the default data_source is automatically assigned to the first connection included in the environment definition.
When is the default data_source used?
The default data_source is only used if a model does not explicitly define a data_source. If all models specify a data_source, the default is never used.
What is the default environment?
The default environment is an automatically generated environment that cannot be edited. It reflects the current set of available connections and exists as a fallback when no environment is explicitly specified. It is also used by Embeddable sample models.