Improved abstract/base cubes for YAML data modeling
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Is your feature request related to a problem? Please describe.**
Hey, I've been using Cube for about a month now, so I might be missing something, feel free to correct me!
I have a classic inheritance/extend scenario with multiple entities sharing some properties. I'm using the YAML format and I feel a bit limited in how to implement a solid abstraction cube. Currently I have created a `base_entity` cube with all the shared properties that is then extended in multiple `X_entity` cubes.
This works, technically, but there's a few _minor_ limitations. Looking at the [docs](https://cube.dev/docs/product/data-modeling/reference/cube#extends):
> You can also omit the cube name while defining a cube in JavaScript. This way, Cube doesn’t register this cube globally; instead it returns a reference which you can use while combining cubes.
Something like this would be very useful for YAML as well. For my AI-agent use-case this is important because currently the response from `{base_path}/v1/meta` will also contain the base cube which will clutter the LLM's context with unnecessary data.
Sidenote - the [docs](https://cube.dev/docs/product/apis-integrations/core-data-apis/rest-api/reference#base_pathv1meta) claim that:
> Information about cubes and views with `public: false` will not be returned.
Not sure if there's something wrong with my config (maybe `DEV_MODE` affects this), but this doesn't seem to apply
**Describe the solution you'd like**
Add an `abstract` parameter to cubes, which would work similarly as omitting the `name` parameter for JS cubes. Secondarily, this could allow the omitting of `sql`/`sql_table` param for the abstract cubes
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.