Search code examples
scalardfapache-flinksensorssemantic-web

How to show data from the RDF archive in scala flink


I am looking for an approach to load and print data from .n3 files of .tar.gz archive in scala. Or should I extract it?

If you want to download the file, it is located on http://wiki.knoesis.org/index.php/LinkedSensorData

Could anyone describe how can I print the data on the screen from this archive using scala?


Solution

  • The files that you are dealing with are large. I therefore suggest you import it into an RDF store of some sort rather than try and parse it yourself. You can use GraphDB, Blazegraph, Virtuso and the list goes on. A search for RDF stores should give many other options. Then you can use SPARQL to query the RDF store (which is like SQL for relational databases).

    For finding a Scala library that can access RDF data you can see this related SO question, though it does not look promising. I would suggest you look at Apache Jena, a Java library.

    You may also want to look at the DBPedia Extraction Framework where they extract data from Wikipedia and store it as RDF data using Scala. It is certainly not exactly what you are trying to do, but it could give you insight into the tools they used for generating RDF from Scala and related issues.