@@ -247,11 +247,23 @@ above declared `multiple: true`), is refused
247247Group by a field that stores one value instead. Like the measure check, it
248248stays silent when the field's type cannot be resolved.
249249
250+ A dimension over a ** virtual** field, a ` formula ` , is refused under a second
251+ id. A formula is computed on read and never stored, whatever its ` returnType ` ,
252+ so no driver has a column to group by: the analytics service refuses a query
253+ grouped by one with ` 400 INVALID_FIELD ` , and refuses to compile a dataset that
254+ declares one over its own object with ` 400 DATASET_INVALID ` , whichever members
255+ the query names. So such a dimension is refused
256+ (` dimension-virtual-field-refused ` ) at ` datasets[N].dimensions[M].field ` ; a
257+ dimension through a relationship path is judged on the object the path
258+ reaches. Store the value in a field of its own (written by a hook or a flow
259+ when its source changes) and point the dimension at that field.
260+
250261Both checks also judge the members of an analytics cube (` analyticsCubes ` ),
251262because an authored cube is queried through the same analytics door. A cube
252263dimension whose ` sql ` column is declared with a structured-JSON type or as a
253264multi-value field is refused (` dimension-json-stored-field-refused ` ) at
254- ` analyticsCubes[N].dimensions.<key>.sql ` . A cube measure is judged exactly as a
265+ ` analyticsCubes[N].dimensions.<key>.sql ` , and one whose ` sql ` column is a
266+ formula is refused (` dimension-virtual-field-refused ` ) at the same path. A cube measure is judged exactly as a
255267dataset measure is, its ` type ` being the aggregate: a pair outside the table is
256268refused (` measure-aggregate-field-type-refused ` , at
257269` analyticsCubes[N].measures.<key>.type ` ). That covers ` sum ` , ` avg ` , ` min ` or
0 commit comments