5.1.5-rc.0 • Published 2 months ago

@rdmr-eu/sparql-query-runner v5.1.5-rc.0

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
2 months ago

sparql-query-runner

This NodeJS executable runs a series of pipeline steps, defined in sparql-query-runner.json in the folder root.

Usage

$ npm install --global @redmer/sparql-query-runner
$ sparql-query-runner

For the configuration file, a JSON Schema is available at https://rdmr.eu/sparql-query-runner/schema.json. Supported editors, incuding VS Code, provide syntax validation and text completion using the schema.

Below example shows an excerpt from @stichting-crow/imbor. There is a single (developer-local) endpoint used, that gets the defined prefixes set. Then, a MS-Access database is imported into the GraphDB-instance, five INSERT {} WHERE {}-SPARQL update requests are sent. After a short delay (default: 5 sec), two graphs are downloaded.

version: v5
prefixes:
  ex: https://example.org/
jobs:
  my-first-job:
    sources:
      - file: test1.ttl
        with:
          into-graph: https://example.org/data
    steps:
      - construct: >
          CONSTRUCT { <https://rdmr.eu/> a <http://schema.org/Blog> } WHERE {}
        with:
          into-graph: ex:data
      - shell: echo 'Hello, world'
      - update: >
          INSERT DATA { <https://rdmr.eu/> a <http://schema.org/PostOffice> . }
    targets:
      - file: output1.trig

Documentation on step types

Available at docs/.