Rename event to full_event_name in events_stream views#1007
Rename event to full_event_name in events_stream views#1007
event to full_event_name in events_stream views#1007Conversation
| and dimension["type"] == "string" | ||
| ): | ||
| # `event` field contains concatenated event category and name | ||
| dimension["name"] = "full_event_name" |
There was a problem hiding this comment.
Can the and not (name == "event" and dimension["type"] == "time") line below be removed since this is being renamed? Looks like that's just for events stream #854 and might be useful to catch other similar issues. Not critical though and maybe it's better to leave it as-is
| dimensions = {} | ||
| for dimension in _generate_dimensions_helper(client.get_table(table).schema): | ||
| # Rename `event` field in `events_stream` to `full_event_name` to expose it in Looker views. | ||
| # This is required since `event_timestamp` is renamed to `event` in `_get_dimension` and takes precedence below. |
There was a problem hiding this comment.
IMO it would be better to change the other logic to not have dimension groups conflict in this way, since they wouldn't actually conflict in the generated LookML, as dimension groups generate dimensions with timeframe suffixes. For example, in this particular instance having both a dimension: event and dimension_group: event would be totally fine.
There was a problem hiding this comment.
Thanks for mentioning this, I didn't know Looker allows dimensions and dimension groups with the same name. I'll see if I can change this logic to allow both fields without this rename.
Fixes mozilla/bigquery-etl#5903