View the original community article here
Last tested: Mar 15, 2021
No. You can only add new LookML elements in an extending view but you cannot remove existing ones
For example, if we ave the following in our original/extended view:
dimension: case_when_test {
type: string
case: {
when: {
sql: ${TABLE}.genre = "Drama" ;;
label: "Case1"
}
when: {
sql: ${TABLE}.genre = "Comedy" ;;
label: "Case2"
}
when: {
sql: ${TABLE}.genre = "Action" ;;
label: "Case3"
}
else: "Other"
}
}
And attempt the following in order to reduce the number of the LookML case whens in the extending view, this is not going to work - the dimension is still going to have all the case whens from the original view.
dimension: case_when_test {
type: string
case: {
when: {
sql: ${TABLE}.genre = "Drama" ;;
label: "Case1"
}
else: "Other"
}
}
As a workaround, we would want to use SQL CASE WHEN in the sql
parameter in both the original view and the extending view.
This content is subject to limited support.