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

fix: Correctly handle cube metadata #1143

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Aug 24, 2023

Closes #1138.
Closes #1131.

This PR:

  • aligns the way of detecting literal dimensions by using shacl:nodeKind = shacl:Literal. This results in smaller queries when fetching observations and should thus improve overall performance of the application a bit,
  • updates the rdf-to-visualize part of the documentation to be up-to-date when it comes to defining isLiteral and isNumerical dimension properties.

@Rdataflow I hope this should align the way we handle cubes with the cube spec – let me know if there is anything else you've identified (looks like the Data types section of the spec is not very extensive).

I didn't introduce any changes to the way we detect isNumerical property, as I believe it's done correctly (the Energy dimension mentioned in #1131 lacks the dataType property altogether, that's why it's marked as not numerical). I believe this should be fixed in the data.

How to test

  1. Go to this dataset.
  2. Click on Run SPARQL query button.
  3. See that the query contains 16 dimensions.
  4. Repeat the process on PROD environment.
  5. See that this query has 21 dimensions (5 unnecessary, empty ones due to wrong Literal dimension type detection).

@vercel
Copy link

vercel bot commented Aug 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview Aug 24, 2023 0:01am

@bprusinowski bprusinowski merged commit b09a577 into main Aug 28, 2023
3 of 4 checks passed
@bprusinowski bprusinowski deleted the fix/correctly-handle-cube-metadata branch August 28, 2023 13:29
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

Successfully merging this pull request may close these issues.

Recognize data types according to cube specification wrong query generated on Strompreise
2 participants