Skip to content

CSV2RDF4LOD_BASE_URI

Tim L edited this page May 23, 2013 · 24 revisions

What is first

  • Setting the CSV2RDF4LOD_BASE_URI environment variable is essential because it provides the base for all URIs that csv2rdflod creates. See Conversion process phase: name for the "source-dataset-version" naming convention and how it is situated within CSV2RDF4LOD_BASE_URI.
  • https://github.com/timrdf/csv2rdf4lod-automation/wiki/CSV2RDF4LOD_BASE_URI# (this page) is the default value for CSV2RDF4LOD_BASE_URI and should always be changed to your project's base URI.

What we will cover

When, how, and why to set CSV2RDF4LOD_BASE_URI.

Let's get to it!

Shell environment variable

CSV2RDF4LOD_BASE_URI is a shell environment variable. It can be set using export on the command line:

export CSV2RDF4LOD_BASE_URI="http://lofd.tw.rpi.edu"

The command above can also be placed in a file and source'd:

echo "export CSV2RDF4LOD_BASE_URI="http://lofd.tw.rpi.edu" >> source-me.sh
source source-me.sh

See Script: source me.sh for more about preserving and maintaining the values of CSV2RDF4LOD_BASE_URI or any of the other CSV2RDF4LOD environment variables.

Used When Generating Enhancement Parameters

The value of the CSV2RDF4LOD_BASE_URI shell environment variable is used when generating enhancement parameters, which appear in the conversion cockpit's manual/ directory. For example, manual/filers.csv.e1.params.ttl contains the value "http://lofd.tw.rpi.edu":

<http://lofd.tw.rpi.edu/source/datahub-io/dataset/corpwatch/version/2013-Apr-24/conversion/enhancement/1>
   a conversion:LayerDataset, void:Dataset;

   conversion:base_uri           "http://lofd.tw.rpi.edu"^^xsd:anyURI;
...

that is used when creating enhancement parameters.

Edit your my-csv2rdf4lod-source-me.sh to set the value, for example, any of the following have been used for various projects:

export CSV2RDF4LOD_BASE_URI='http://logd.tw.rpi.edu'
# or
export CSV2RDF4LOD_BASE_URI='http://aquarius.tw.rpi.edu/projects/provenanceweb'
# or ...

Needed by bin/cr-dataset-uri.sh

cr-dataset-uri.sh needs CSV2RDF4LOD_BASE_URI to be set so that it can produce the dataset URI. If the variable is not set, it returns the URL of this wiki section.

What is next

Clone this wiki locally