Using a dimension_group of type time, Looker automatically appends “Date” to the label. For example, given the following dimension_group:
dimension_group: DateTimeCanceled_ntz {
label: "Date Canceled (UTC)"
type: time
convert_tz: no
timeframes: [
raw,
date
]
sql: ${TABLE}."DATETIME_CANCELED" ;;
}
When navigating the Explore, the label for this dimension_group becomes “Date Canceled (UTC) Date”. I wish it to be the value I explicitly entered in the label parameter: “Date Canceled (UTC)”
Any chance we can override this automatic suffixing of the label:
If you only want to use date, then change it to dimension with type date.
Sorry for the misrepresentation. I do have many date/time Dimension Groups that utilize more than just the date type. Either way, I think the point stands that the automatic suffixing of labels can sometimes create redundant information or confusion for the end users.
Looker sorts the view fields alphabetically. If the engineer wishes to organize their view fields, they must standardize their Dimension & Measure labeling carefully. And if one wishes all date/time fields to be grouped together, they might name them accordingly:
“Date/Time Created”
“Date/Time Started”
"Date/Time Ended
“Date/Time Closed”
“Date/Time Canceled”
That can be a strong organizational scheme for end users that need to easily locate the fields they wish to use in their dashboards. Especially when they are given Views with large field lists. But when they show up like this:
“Date/Time Created Date”
“Date/Time Started Date”
“Date/Time Ended Date”
“Date/Time Closed Date”
“Date/Time Canceled Date”
First of all, it’s redundant. Secondly, an argument can be made that it’s confusing since a time Dimension Group can contain more than just the raw date. Finally, Looker gives us the label Parameter for flexibility. Why wouldn’t we be given full control over the resulting label?
Note that we cannot have that same syntax in the actual column name in the data table (that’s why I used the label parameter to still add the UTC part).