Is it possible to use file info in SPARQL template

21 views
Skip to first unread message

johna...@hotmail.com

unread,
Jul 15, 2016, 7:22:20 AM7/15/16
to Tarql
In order to track the provenance of the generated data, I would like to generate some triple in the output that indicate:
- name of the file from which the data originates
- timestamp of that file

Is there any way to access the metadata of the file from the SPARQL template e.g. using some magic variable like `?__FILENAME__`?

Richard Cyganiak

unread,
Jul 27, 2016, 4:27:32 AM7/27/16
to johna...@hotmail.com, Tarql
Hi John,

Apologies for the silence on the list. I was on vacation without internet access. Just now catching up with all email.

There’s no way of doing what you want at the moment I’m afraid.

Please feel free to raise a feature request issue on GitHub.

I can see a number of ways of doing this. One would be to define some magic variables as you propose.

Another way would be to pass in values for additional pre-bound variables on the command line, and these could then be used in the mapping file:

    tarql --var-TIMESTAMP 2016-07-27T09:26 my_mapping.sparql input.csv

This would assign the given datetime value to a variable ?TIMESTAMP that is available within the mapping.

Richard


--
You received this message because you are subscribed to the Google Groups "Tarql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tarql+un...@googlegroups.com.
To post to this group, send email to ta...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tarql/4a4b4354-309f-49c7-905b-ecba013f87cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages