acdh-oeaw / rdfproxy

GNU General Public License v3.0
2 stars 0 forks source link

Grouping by model field #146

Open lu-pl opened 1 day ago

lu-pl commented 1 day ago

Currently, the group_by model config parameter is implemented to take a reference to a SPARQL binding.

The rationale for this behavior was, that grouping should also be possible by values that are not necessarily defined as fields of the model.

However, since grouping is primarily concerned with the shapes definition, i.e. with the model, grouping by a model field would arguably be more intuitive and conceptually more consistent.

Proposal

group_by should be able to take a model field reference as well as a SPARQL binding name, with model fields taking precedence over SPARQL bindings for grouping.

Although grouping by an excluded field of the model would allow to group by values that will not be part of the model serialization, also supporting grouping by SPARQL bindings is more convenient for that particular use case.

lu-pl commented 21 hours ago

Note: Reflect upon potential consequences for rdfproxy.SPARQLBinding.