Extracting GraphML from Stardog

Hi Everyone,

Is there a good way to extract GraphML from Stardog, to load into NetworkX? Any other option that will arrive to nx.Graph?

Thank you

There's nothing built-in for GraphML but there's this extension point: https://www.stardog.com/docs/#_http_server

So technically you can add your custom HTTP service to generate GraphML out of, say, CONSTRUCT query results. Or any other format that NetworkX would accept.

Of course it'd be easier to transform one of the standard RDF serialization into GraphML outside of Stardog and only look at server extensions when you hit performance problems.

Best,
Pavel

To build on what @pavel said, I wouldn't say there is a good way to do it but there are ways. It makes me a little sad that this is so difficult. Like it or not, most of the data world is made up of trees and since a tree is a subset of a graph you'd think it wouldn't be as difficult as it is.

If you don't like yourself you can always output to RDF/XML and write an XSLT transform. Then if you really hate yourself you can get into your time machine and check out GRDDL

There's also XSPARQL but it hasn't been worked on for a long time but it should work. I've always found it to be a clever solution but with the complexity and lack of adoption of XQUERY I find it it difficult to see the benefit of using it over just using a full blown programming language.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.