-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
data modelingdocsIssues that require a documentation improvementIssues that require a documentation improvementquestionThe issue is a question. Please use Stack Overflow for questions.The issue is a question. Please use Stack Overflow for questions.
Description
Hey Guys, i try 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 i get the feeling there is some issue with defining sql and sql table
With a Cube like this:
cubes:
- name: users
sql_table: users
i cant write cubes 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'
it will cause the error
You must use either sql or sqlTable within a model, but not both
Metadata
Metadata
Assignees
Labels
data modelingdocsIssues that require a documentation improvementIssues that require a documentation improvementquestionThe issue is a question. Please use Stack Overflow for questions.The issue is a question. Please use Stack Overflow for questions.