extensions-api
extensions-api copied to clipboard
Get FieldRoleType in DataTable Column
It would be very helpful, to get the information if a column is a measure or a dimension, as these are often visualized differently. (e.g. a measure as length of a bar, and a dimension as category label).
There are currently only two ways to achieve this:
- Differentiate between them using the dataType in the Column Object and using numeric Columns as measures and string ones as dimensions (This fails on numeric dimensions like years and months)
- By querying the data sources and search through their fields, find the matching one for the column and read its FieldRoleType. This works mostly, but it requires another async call which hurts performance, and I'm not sure if this works in more complex scenarios with multiple datasources.
It would be really convenient to have the info directly along with the data in the Column Object.
Thank you for the suggestion @Tubulidentata. We had a consultation with our data team, and they believe we can get this added to the column information. We will add this to our backlog. John