Skip to content

Reusing enhancement parameters for multiple versions or datasets

timrdf edited this page Mar 20, 2011 · 52 revisions

What's first?

Introduction

(Paths are relative to the "conversion cockpit"; see Directory Conventions)

csv2rdf4lod-automation looks for the enhancement parameters within the manual/ directory using the following convention:

  • To determine the local name of the enhancement parameters, append e1.params.ttl to the local name of the CSV.
  • Look for the enhancement parameters relative to the manual/ directory.

So, for example, if the CSV is source/my.csv, the enhancement parameters will be at manual/my.csv.e1.params.ttl. Although the enhancement parameters [are created automatically](Generating enhancement parameters), they are placed in manual/ because they will be edited by a human (see Conversion process phase: retrieve for the distinction among source/, manual/, automatic/, and publish/). Subsequently, additional layers can be created by [generating](Generating enhancement parameters) and tweaking additional enhancement parameters, e.g., manual/my.csv.e2.params.ttl, manual/my.csv.e3.params.ttl, and so on.

Although a "one enhancement file for each CSV" clearly establishes which parameters will be (and were) used, it becomes tedious to maintain many enhancement files when there are many CSVs that share similar structure. Thus, there are three ways to apply enhancement parameters outside of the one manual/*.e1.params.ttl file that is used by default.

  • Create file-dependent global enhancement parameters ../my.csv.e1.params.ttl
  • Create file-independent global enhancement parameters ../e1.params.ttl
  • Pull the common enhancement parameters into a separate file and use conversion:includes.

Applying "Global" enhancement parameters

When attempting to convert source/foo.csv, csv2rdf4lod-automation looks for:

manual/foo.csv.e1.params.ttl

if not there, it looks for

../foo.csv.e1.params.ttl

if not there, it looks for:

../e1.params.ttl

(for the actual implementation, see $CSV2RDF4LOD_HOME/bin/convert.sh)

Using conversion:includes

conversion:includes

Clone this wiki locally