-
Couldn't load subscription status.
- Fork 1.9k
Closed
Labels
Description
Describe the bug
If a dimension definition doesn't have the type parameter, the data model would not compile, which is expected:
# THIS WOULD NOT COMPILE
cubes:
- name: base_cube
sql_table: foo
measures:
- name: count
type: count
dimensions:
- name: baz
sql: baz
# NO TYPE HEREHowever, if this dimension is a child cube that extends another one, the data model would compile:
# THIS WOULD COMPILE BUT IT SHOULD NOT
cubes:
- name: base_cube
sql_table: foo
measures:
- name: count
type: count
- name: child_cube
extends: base_cube
dimensions:
- name: bar
sql: bar
# NO TYPE HEREThe dimension would appear in /meta without any type:
"dimensions": [
{
"name": "child_cube.bar",
"title": "Child Cube Bar",
"shortTitle": "Bar",
"suggestFilterValues": true,
"isVisible": true,
"public": true,
"primaryKey": false
}
],Apparently, it would work with the REST API without issues.
However, running any queries against the SQL API, e.g., \d, would result in the following error:
ERROR: missing field `type` at line 1 column 12227
To Reproduce
See above.
Expected behavior
Dimensions without type never compile.
Version:
0.35.73