laminlabs / lamin-usecases

Use cases.
https://docs.lamin.ai
Apache License 2.0
5 stars 0 forks source link

Add SPARQL demonstration #124

Closed Zethson closed 6 months ago

Zethson commented 6 months ago

https://www.notion.so/laminlabs/Exemplify-RDF-exports-and-SPARQL-queries-31e9cecc61764bcf9e325b7b26f42b17

This PR adds a first idea of how to use SPARQL queries with lamindb registries

  1. We can convert our registries to DataFrames and build RDF graphs that can be queried
  2. We can save public registries via Pronto to disk (as .json) and then build a RDF graph based on the json content
github-actions[bot] commented 6 months ago

🚀 Deployed on https://662900fa9368801e214aea4d--lamin-usecases-ddcd.netlify.app

falexwolf commented 6 months ago

Thank you, Lukas!

From my end, this looks good as a first draft and I don't think we should invest more at this point.

Two small asks:

  1. How about this title: "RDF export & SPARQL queries"
  2. Can you separate the "export" from the "query" and make subsections so that people understand what the SPARQL query is?

Do we need both the "DataFrame" and the "Pronto" section? Can't we just use whatever's easier/better and keep the alternative somewhere else, but not in the user-facing docs.

Zethson commented 6 months ago

Two small asks:

1. How about this title: "RDF export & SPARQL queries"

Yeah sure. The title wasn't final.

2. Can you separate the "export" from the "query" and make subsections so that people understand what the SPARQL query is?

Will do

Do we need both the "DataFrame" and the "Pronto" section? Can't we just use whatever's easier/better and keep the alternative somewhere else, but not in the user-facing docs.

Yup! This was more for us to see how it could work and whether it's a good idea or not. Let's stick to the DataFrame version because:

  1. It doesn't require saving the ontology as .json file
  2. It can be easier queried because it contains less fluff
falexwolf commented 6 months ago

Sounds great!

falexwolf commented 6 months ago

Oh, and can we rename the notebook (slug) to rdf-sparql rather than just sparql? I think RDF is as important as SPARQL as a keyword for somebody who googles "lamin + rdf".