INTEGER Field as True Numeric Field & Dimension
With the Vesper 6.0 release, Integer became a hybrid type that you can compute on and group by too.
Background
The INTEGER field type was introduced to provide a numeric field with “string like” features: possibility to set it as Key field, or as Dimension field for groupBys, and under the hood these two features also mean it gets indexed. This is why it was introduced with a quite strict limitation: INTEGER.isNumeric() is false.
Change in Vesper 6.0
The INTEGER field has been changed to a true numeric field and at the same time it is allowed to be a Dimension.
The caveat to keep in mind now is that any expression based on an INTEGER will result in a NUMBER.
In the UI, if an INTEGER field is not a Dimension, setting up a measure based on the field will provide the typical numeric options: SUM, AVG, CONTRIB… If set to be a Dimension, the options will be: COUNT, COUNT_DISTINCT. The expression editor will still allow to input a SUM().
When querying PA data in Groovy, it is possible to group on an INTEGER field or group on some other Dim field and compute group by expressions (SUM…). But do not expect to group by an expression based on an INTEGER, because any expression based on an INTEGER will result in a NUMBER, hence it is not groupable.
Impact
- In Data Source / Datamart setup (where Integer is one of the field types)
- In PA queries, including charts
- In the group by context (since Integers can now be dimensions)
Found an issue in documentation? Write to us.