robot icon indicating copy to clipboard operation
robot copied to clipboard

SPARQL query CSV/TSV output - make literals simple and implement CURIEs

Open cmungall opened this issue 8 years ago • 2 comments
trafficstars

Currently the Jena CSV/TSV writer is used. We may have to implement our own writer here (should be sraightforward iteration over ResultSet) to implement the two requirements here for TSVs:

Inconsistencies with literals

  • for TSVs, the XSD type for literals is shown, and the literal is quoted, e.g. "foo"^^xsd:string
  • for CSVs, the XSD type is not shown, only the string value of the literal is shown

I think the TSV behavior is undesirable in the majority of cases. It's implicit the consumer of a TSV is after some kind of simplification of the RDF, making them parse RDF quoted literals defeats the purpose.

Contraction of URLs to CURIEs

AFAICT there is no way to make the Jena writer do this. This should be a command line option we provide - many people want to see the CURIEs in their exports.

cmungall avatar Jul 24 '17 00:07 cmungall

@dougli1sqrd any progress on this?

cmungall avatar Mar 14 '19 22:03 cmungall

Also remove ?s from header - should be pandas-friendly

cmungall avatar Apr 05 '19 23:04 cmungall