Skip to content
csarven edited this page Jan 31, 2012 · 3 revisions

Table of Contents

VoID and SPARQL Service Description Documentation

VoID + SD: http://data-gov.ie/void.ttl

Staging

The TDB assembler file mentioned below sets the store location. For staging, it is located in /usr/lib/fuseki/DBStaging/

SPARQL Endpoint URI

http://staging.data-gov.ie/sparql

How to start Fuseki in update mode

Note that we start fuseki in read and write mode:

/usr/lib/fuseki/fuseki-server.datagovie.staging --verbose --update --port=3131 --desc

/usr/lib/fuseki/tdb2.datagovie.staging.ttl /dataset

Importing data using SPARQL 1.1 Graph Store HTTP Protocol

How to import (put) RDF into Fuseki's store

/usr/lib/fuseki/./s-put --verbose http://localhost:3131/dataset/data http://data-gov.ie/graph/{name} file.rdf
Note: Put clears and deletes existing graph and its data.

How to import (post) RDF into Fuseki's store

/usr/lib/fuseki/./s-post --verbose http://localhost:3131/dataset/data http://data-gov.ie/graph/{name} file.rdf 
Note: Post will add triples to existing graph. If graph doesn't exist, it will create one.

Using GraphPusher tool

URL: https://github.com/csarven/graphpusher Examples:

ruby GraphPusher.rb http://example.org/void.ttl --assembler=/usr/lib/fuseki/tdb2.datagovie.staging.ttl

ruby GraphPusher.rb http://example.org/void.ttl --dataset=http://localhost:3131/dataset/data

(See README for more information)

Importing directly to TDB storage

Example:

java tdb.tdbloader --desc=/usr/lib/fuseki/tdb2.datagovie.staging.ttl --graph=http://purl.org/linked-data/cube cube.ttl

Optional help

  • Run the following bash script from a directory with several RDF files which needs to go into the same graph.
Remove comments and use accordingly for your needs:
#PRWODI=$PWD

#BN=$BASENAME

pwdrelative=${PWD##*/}

for file in *.ttl;

    do

#        filename=$(basename $file);

#        extension=${filename##*.};

#        graph=${filename%.*};

        /usr/lib/fuseki/./s-post --verbose http://localhost:3131/dataset/data http://data-gov.ie/graph/$pwdrelative $file;

    done;

Production

How to start Fuseki

Note that we start it in read only mode:

/usr/lib/fuseki/fuseki-server --verbose --desc /usr/lib/fuseki/tdb2.dataset.ttl /dataset

Synching Staging and Production

  1. Review data in Staging.
  2. Go to step 1.

Synch

NOTE: I have a graphpusher-hotswap.rb in works. I'll put that here when ready for production use. -Sarven

We do DB hot-swap:

  1. Stop the production Fuseki service
  2. Just caution: Make sure staging store exists (i.e., /usr/lib/fuseki/DBStaging ) and contains data. Double check staging.
  3. Back up existing production store: mv DB DB.bak
  4. Stop the staging Fuseki service (in case something funky updates are happening)
  5. Make a copy of the staging store for production: cp -R DBStaging DB
  6. Start production Fuseki service
  7. Start staging Fuseki service
  8. Check around http://data-gov.ie/ to make sure things are running okay.
  9. Go outside and get some sun