-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
data modelingenhancementLEGACY. Use the Feature issue type insteadLEGACY. Use the Feature issue type instead
Description
Describe the bug
Hey Guys, i tried to follow:
https://cube.dev/docs/product/data-modeling/concepts/polymorphic-cubes
and
https://cube.dev/docs/product/data-modeling/concepts/code-reusability-extending-cubes
but if you use sql_table in your base cube and sql in your extended cube, then u get the error:
You must use either sql or sqlTable within a model, but not both
To Reproduce
- Create a Base Cube like this:
cubes:
- name: users
sql_table: users
- Extend the Base Cube like this:
cubes:
- name: teachers
extends: users
sql: >
SELECT * FROM {users.sql()} WHERE type = 'teacher'
- name: students
extends: users
sql: >
SELECT * FROM {users.sql()} WHERE type = 'student'
Expected behavior
I would expect the sql attribute to overwrite the sql_table
davidv1213
Metadata
Metadata
Assignees
Labels
data modelingenhancementLEGACY. Use the Feature issue type insteadLEGACY. Use the Feature issue type instead