-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
enhancementLEGACY. Use the Feature issue type insteadLEGACY. Use the Feature issue type instead
Description
Problem
Is this the intended behavior when applying FILTER_PARAMS
with views?
If I use FILTER_PARAMS
in a measure:
cubes:
- name: my_cube
measures:
- name: my_measure
type: count
filters:
- sql: {FILTER_PARAMS.my_cube.my_dimension.filter(filter)}
with a view that uses the cube:
views:
- name: my_view
cubes:
- join_path: my_cube
includes: "*"
The FILTER_PARAMS
doesn't apply if I query the view with the SQL API:
SELECT count(my_measure)
FROM my_view
WHERE my_dimension = x
since this references my_view.my_dimension
, not my_cube.my_dimension
.
Is this the intended behavior? There are some workarounds like adding the view's dimension as a FILTER_PARAM:
sql: {FILTER_PARAMS.my_cube.my_dimension.filter(filter)}
and {FILTER_PARAMS.my_view.my_dimension.filter(filter)}
Or joining with the cube so the cube's dimension can be referenced:
SELECT count(my_measure)
FROM my_view CROSS JOIN my_cube
WHERE my_cube.my_dimension = x
But these seem like hacky solutions.
Metadata
Metadata
Assignees
Labels
enhancementLEGACY. Use the Feature issue type insteadLEGACY. Use the Feature issue type instead