-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Count_distinct aggregations are not generated properly.
Example
models:
- name: test
table: (SELECT 1 as id, 100 as value)
primary_key: id
metrics:
- name: total
agg: sum
sql: value
- name: location
table: LOCKERS_AGGREGATION__DEV.METRICS.DIM_LOCATION
primary_key: sk_location_id
metrics:
- name: count
agg: count_distinctgenerates for location.count
WITH location_cte AS (
SELECT
sk_location_id AS sk_location_id,
count AS count_raw
FROM LOCKERS_AGGREGATION__DEV.METRICS.DIM_LOCATION
)
SELECT
COUNT(DISTINCT location_cte.count_raw) AS count
FROM location_cte
-- sidemantic: models=location metrics=location.count dimensions=and count does not exist in the table
nicosuave
Metadata
Metadata
Assignees
Labels
No labels