SmartDataAnalytics / RdfProcessingToolkit

Command line interface based RDF processing toolkit to run sequences of SPARQL statements ad-hoc on RDF datasets, streams of bindings and streams of named graphs with support for processing JSON, CSV and XML using function extensions
https://smartdataanalytics.github.io/RdfProcessingToolkit/
Other
40 stars 3 forks source link

Make use of Jena's extension rsparql extension mechanism #7

Closed Aklakan closed 1 year ago

Aklakan commented 5 years ago

Jena already provides SPARQL command line tooling with extension support. As sparql-integrate does a bit more than just registering extensions (e.g. it supports processing sequences of queries from multiple files), it does not seem possible to integrate completely into (r)sparql (i.e. having sparql-integrate as only a command line wrapper that invokes (r)sparql with the appropriate extensions).

Yet, there are 2 things we can do:

Aklakan commented 1 year ago

By now rpt integrate supports --set and --explain (pendant of '--verbose'). For the deb and rpm packages, custom jar files can be added to the class path via EXTRA_CP.

Example:

EXTRA_CP='./GTFS-Functions.jar' rpt integrate \
  '(<java:org.moin.rml.functions.GTFSFunctions#timeNormalize>("28:02:00") AS ?x) {}' --out-format csv
x
4:02:00