w3c / sparql-results-csv-tsv

https://w3c.github.io/sparql-results-csv-tsv/
Other
0 stars 1 forks source link

Incorporate RDF-star CG report #18

Closed rubensworks closed 1 year ago

rubensworks commented 1 year ago

As far as I can see the CG report does not propose a CSV/TSV extension, so we'll have to come up with one here.

afs commented 1 year ago

For TSV, it comes naturally from Turtle changes.

For CSV, maybe it doesn't need to support quoted triples.

It is not for all use cases even in SPARQL 1.1. It did start as "data into spreadsheets".

rubensworks commented 1 year ago

For CSV, maybe it doesn't need to support quoted triples.

We could; but that means that not all possible query results will be representable in SPARQL/CSV, while this is possible today. IMO, supporting it would be therefore better. But perhaps we should discuss this in the WG (adding a label)

Since SPARQL/CSV relies on STR() behaviour, perhaps we should consider extending STR() to also support quoted triples (which is not the case yet in the CG report AFAICS).

kasei commented 1 year ago

Agree that CSV support would be preferable, and also that it would be nice if STR were extended to support triples.

rubensworks commented 1 year ago

I just looked into this a bit, and perhaps adding support for quoted triples to STR() might not be the best way forward after all.

The problem with STR(), is that it's currently only defined for IRIs and literals, but not for blank nodes. So if we want to add support for quoted triples, we'd also need to add support for blank nodes, as these could be part of quoted triples. Given the nature of blank nodes, there is a case to be made for not defining STR() for them.

So either we add both quoted triple and blank node support to STR(), or we just define this ad-hoc in the CSV/TSV spec. I'm currently leaning towards the latter.

afs commented 1 year ago

Adding specifically for CSV/TSV makes sense.

For TSV, which uses "Turtle terms", a quoted triple would be << ... >>.