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

Support export rdf graph in CSV format #36

Open
weiranfu opened this issue May 26, 2023 · 4 comments
Open

Support export rdf graph in CSV format #36

weiranfu opened this issue May 26, 2023 · 4 comments

Comments

@weiranfu
Copy link

weiranfu commented May 26, 2023

Hey,

I noticed that currently export-rdf only supports exporting files in format of turtle, nquads, ntriples, neptuneStreamsJson and neptuneStreamsSimpleJson. Is it possible to support exporting files in CSV format? So that we can using SELECT tuple queries in SPARQL and export results in CSV format to be used by data warehouse.
DW usually doesn't have a good support for files in RDF format.

Seems it already supports tuple queries but io doesn't support CSV writer.

Thanks,
Weiran

@Cole-Greer
Copy link
Collaborator

Cole-Greer commented May 29, 2023

Hi @weiranfu,

We will look into adding CSV support for RDF exports. Just to ensure that we are on the same page, would you expect the exported CSV to be a fixed 4 column (S,P,O,G) output such as:

s1,p1,o1,g1
s2,p2,o2,g2

Thanks,
Cole

@weiranfu
Copy link
Author

Hey Cole,

Thanks for your response.
I think the result can have arbitrary columns. For example, we put n IRI in the SELECT closure, we will have n columns in CSV with headers.

Thanks,
Weiran

@charlesivie
Copy link
Contributor

This implies a use case where the export is the result of a SPARQL Select query, and not of a CONSTRUCT query.
I would suggest that a user could choose CSV for query; if it is a SELECT query, use the column names as the header in the CSV, if it is a CONSTRUCT query, create a csv header of subject, predicate, object.

@weiranfu
Copy link
Author

yes @charlesivie

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