You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running csv2rdf with just a -t table csv2rdf does not locate the metadata document, and instead performs the default conversion (note we should also provide a flag to adjust this behaviour #188).
It would be useful if csv2rdf could follow the spirit of the conventions specified in the specs for local files too.
Suggestion
NOTE: the specification falls back to RFC 5785 to specify the well-known location for the csvm templates file; however this RFC says nothing of what to do for the file:/// URI scheme.
Therefore I think the closest behaviour we can achieve here is to fallback to checking for a tool specific config folder ~/.csv2rdf/csvm, and use the template file from there; if no such template file is specified then we should use the default template file from the spec:
{+url}-metadata.json
csv-metadata.json
This would then give us the expected results where inputs like the following work:
with the final fall back csv-metadata.json being resolved in terms of the original provided URI/path. Resolution here will mean that a sibling csv-metadata.json to the supplied -t file will be located.
The text was updated successfully, but these errors were encountered:
RickMoynihan
changed the title
If given just a file via -t csv2rdf does not appear to correctly locate the metadata document
If given just a file via -t csv2rdf does not locate the metadata document
Aug 17, 2022
When running
csv2rdf
with just a-t
table csv2rdf does not locate the metadata document, and instead performs the default conversion (note we should also provide a flag to adjust this behaviour #188).It would be useful if
csv2rdf
could follow the spirit of the conventions specified in the specs for local files too.Suggestion
NOTE: the specification falls back to RFC 5785 to specify the well-known location for the
csvm
templates file; however this RFC says nothing of what to do for thefile:///
URI scheme.Therefore I think the closest behaviour we can achieve here is to fallback to checking for a tool specific config folder
~/.csv2rdf/csvm
, and use the template file from there; if no such template file is specified then we should use the default template file from the spec:This would then give us the expected results where inputs like the following work:
-t file:///Users/rick/data/my-data.csv
->
file:///Users/rick/data/my-data.csv-metadata.json
-t ../data/my-data.csv
->
../data/my-data.csv-metadata.json
with the final fall back
csv-metadata.json
being resolved in terms of the original provided URI/path. Resolution here will mean that a siblingcsv-metadata.json
to the supplied-t
file will be located.The text was updated successfully, but these errors were encountered: