Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncontrolled predicates in query output #112

Open
langsamu opened this issue Apr 27, 2018 · 0 comments
Open

Uncontrolled predicates in query output #112

langsamu opened this issue Apr 27, 2018 · 0 comments

Comments

@langsamu
Copy link
Contributor

langsamu commented Apr 27, 2018

Some of the endpoints are based on SPARQL queries that produce predicates not defined in the ontology.

For example https://id.parliament.uk/schema/memberCount (a calculated value) in https://github.com/ukparliament/Data.Api.FixedQuery/blob/170a32813446ff4f0312ba9c1fa1e5b6bd407a97/Parliament.Data.Api.FixedQuery/Sparql/group_by_id.sparql#L22 and https://id.parliament.uk/schema/value (a marker property) in https://github.com/ukparliament/Data.Api.FixedQuery/blob/4b2f02ad361d07a5393fb27a6d93a5a4099de76d/Parliament.Data.Api.FixedQuery/Sparql/member_a_to_z.sparql#L3

This is legal and doesn't cause any functional problems, but it's unfortunate in that these predicates are not further described. Their meaning is from their name, their query context and their use by consumers.
This practice also increases the likelihood of a naming collision (where a query author uses a property name not as intended by the ontology).

I think query authors should be free to shape their output as they wish (although I'd recommend using ontology properties as intended wherever possible). I also think we should have a policy for bespoke predicates: Don't use the Parliamentary namespace (id.parliament.uk).

Alternatives I see are

  • URNs: urn:uk-parliament:website-query:memberCount
  • Example URIs: http://example.com/uk-parliament/website-query/memberCount

Important is not to reuse a namespace and not to appear to be dereferencable.

We should definitely consider the impact on GROM and its decorators.

@christopheralcock, @mattrayner, what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant