Skip to content

Conversion process phase: create conversion trigger

Timothy Lebo edited this page Feb 14, 2012 · 30 revisions
csv2rdf4lod-automation is licensed under the [Apache License, Version 2.0](https://github.com/timrdf/csv2rdf4lod-automation/wiki/License)

[up](Conversion process phases)

What's first?

How do I create my conversion trigger?

Create your conversion trigger by going into one of your conversion cockpits:

bash-3-2$ cd ~/Desktop/source/rpi-edu-lebot/exercise-jogging-statistics/version/2011-Jan-24

Check that you are in the right place (conversion cockpits always have these directories):

bash-3-2$ ls
source/
manual/

Then create the conversion trigger (-w stands for write to disk) by pointing to all CSVs that you want to convert:

bash-3-2$ cr-create-convert-sh.sh -w source/*.csv

Next, see the new conversion trigger convert-*.sh shell script:

bash-3-2$ ls
source/
manual/
convert-exercise-jogging-statistics.sh

Itching to pull it? Check out the next phase.

NOTE: If you had to [csv-ify](Conversion process phase: csv ify) the files in source/, then you should have put your results in manual/ and can create your conversion trigger pointing to the files in manual/ instead of source/:

bash-3-2$ cr-create-convert-sh.sh -w manual/*.csv

Can I provide the delimiter when I create the conversion trigger?

Yup:

An example from Example: EPA's Enforcement & Compliance History Online (ECHO):

cr-create-convert-sh.sh -w --delimiter \| source/ICP01.TXT

will include:

#/bin/bash
...
cellDelimiter=\|                   # ONLY one character

which is used to populate the conversion:delimits_cell triple during the raw and enhancement template construction:

@prefix conversion: <http://purl.org/twc/vocab/conversion/>
...
   conversion:conversion_process [
    ...
      conversion:delimits_cell "|";

To specify tab delimiters, use:

cr-create-convert-sh.sh -w --delimiter '\t'  source/gene2ensembl

What's next?

Clone this wiki locally