Last active
September 2, 2022 08:30
-
-
Save masutaka/e1bcfcae9dc1755d43bd7635936a924a to your computer and use it in GitHub Desktop.
[解決] なぜか特定の Measure が Explore に出てこない (Looker 22.14.44)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
explore: sample { | |
join: sample2 { | |
type: left_outer | |
relationship: many_to_one | |
sql_on: ${sample.medium} = ${sample2.medium} ;; | |
} | |
} | |
view: sample { | |
derived_table: { | |
sql: SELECT 'Google' AS medium, 300 AS imp UNION ALL | |
SELECT 'Google', 500 UNION ALL | |
SELECT 'Facebook', 700 ;; | |
} | |
dimension: medium { | |
type: string | |
} | |
dimension: imp { | |
type: number | |
} | |
# 表示される | |
measure: count { | |
type: count | |
} | |
# 表示される | |
measure: total_imp { | |
type: sum | |
sql: ${imp} ;; | |
} | |
# 表示される | |
measure: max_imp { | |
type: max | |
sql: ${imp} ;; | |
} | |
# 表示される | |
measure: min_imp { | |
type: min | |
sql: ${imp} ;; | |
} | |
} | |
view: sample2 { | |
derived_table: { | |
sql: SELECT 'Google' AS medium, 'Alice' AS assignee, 123 AS point UNION ALL | |
SELECT 'Facebook', 'Bob', 76 ;; | |
} | |
dimension: medium { | |
type: string | |
hidden: yes | |
} | |
dimension: assignee { | |
type: string | |
} | |
dimension: point { | |
type: number | |
} | |
# なぜか表示されない | |
measure: count { | |
type: count | |
} | |
# なぜか表示されない | |
measure: total_point { | |
type: sum | |
sql: ${point} ;; | |
} | |
# 表示される | |
measure: max_point { | |
type: max | |
sql: ${point} ;; | |
} | |
# 表示される | |
measure: min_point { | |
type: min | |
sql: ${point} ;; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
primary_key を設定していないことが原因でした...。
https://twitter.com/masutaka/status/1565616040775626754