TDB/Commands

From Jena wiki

Jump to: navigation, search

Contents

[edit] Scripts

The directory bin/ contains shell scripts to run the commands from the command line. The scripts are bash scripts which also run over Cygwin.

[edit] Script set up

Set the environment variable TDBROOT to the root of the the TDB installation.

They are bash scripts, and work on Linux and Cygwin for MS Windows.

 $ PATH=$TDBROOT/bin:$PATH

Alternatively, there are wrapper scripts in $TDBROOT/bin2 which can be placed in a convenient directory that is already on the shell command path.

[edit] Argument Structure

Each command then has command-specific arguments described below.

All commands support --help to give details of named and positional arguments.

There are two equivalent forms of named argument syntax:

--arg=val 
--arg val

[edit] Setting options from the command line

TDB has a number of configuration options which can be set from the command line using:

 --set tdb:symbol=value

Using tdb: is really a short hand for the URI prefix http://jena.hpl.hp.com/TDB# so the full URI form is

 --set http://jena.hpl.hp.com/TDB#symbol=value

[edit] TDB Commands

[edit] Store description

TDB commands use an assembler description for the persistent store

--desc=assembler.ttl
--tdb=assembler.ttl

or a direct reference to the directory with the index and node files:

--loc=DIRECTORY
--location=DIRECTORY

The assembler description follow the form for a dataset given in TDB assembler description page.

If neither assembler file nor location is given, --desc=tdb.ttl is assumed.

[edit] tdbloader

Bulk loader and index builder. Performan bulk load operations more efficiently than simply reading RDF into a TDB-back model.

[edit] tdbquery

Invoke a SPARQL query on a store. Use --time for timing information. The store is attached on each run of this command so timing incldues some overhead not present in a running system.

[edit] tdbdump

Dump the store in N-triples or another format. Only N-Triples is streaming format and can cope with stores of any size.

[edit] tdbconfig

Runs various subcommands:

  • info: Print version details (also "--version" to most commands)
  • stats: Produce a statistics file based on property frequencies in the data.
  • help: Print sub command names.
  • prefixes --loc directory: Prefixes for the dataset in a directory.
  • nodes NodeFile: Print the nodes in the file.