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

how to export my graph to RDF #303

Open
immusferr opened this issue Mar 24, 2023 · 3 comments
Open

how to export my graph to RDF #303

immusferr opened this issue Mar 24, 2023 · 3 comments

Comments

@immusferr
Copy link

Hi, I am pretty new to Neo4j and the Graph Data Science Library. And I want to export the whole graph from my neo4j graph into RDF format. I studied the n10s documentation and tried to use

call n10s.rdf.export.cypher("match(n) return n",{stream:True})
and
call n10s.rdf.export.cypher("MATCH (n)-[r]-(m) RETURN n,r, m")

But none of them work, and the query results are empty.

@jbarrasa
Copy link
Collaborator

Hi, the use of the two procedures looks right so probably the problem is elsewhere.
Can you provide more context, please?
Some way of reproducing the issue?
The only way these procedures can return empty results is if the DB is empty.

@immusferr
Copy link
Author

immusferr commented Mar 24, 2023

@jbarrasa Hi jesus, thanks for the reply. I am using neo4j server 4.3.3 and neosemantics 4.3.0.2.
I want to export all my graph data as a whole to rdf format file.
After reading your awesome guidebook, I checked all the data in neo4j with match(n) return n and the result is as follows:
image

There are indeed some data in the Neo4j. Then I try to use call n10s.rdf.export.cypher("match(n) return n",{stream:True}) export command, and the result is as follows:
image

The same scenario happened on the procedure call n10s.rdf.export.cypher("MATCH (n)-[r]-(m) RETURN n,r, m"):
image

And I would like to ask an additional question if I want to export the output in rdf format to a file, is the
call n10s.rdf.export.cypher("match(n) return n",{stream:True, format: 'RDF/XML', file:'output.rdf' } )
command the correct one?

Thanks,
huxl

@gedman4b
Copy link

Hey @jbarrasa , why haven't you answered this? I am actually having the same issue. I am starting to think that there is no solution for this and that being able to export a graph to RDF is a ruse. Prove this wrong.

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

3 participants