Skip to content

triple_store

Kai Blumberg edited this page Oct 28, 2021 · 25 revisions

Commands to get the PM paper 3 triple store and other technology working.

Tarql

https://tarql.github.io/

https://github.com/tarql/tarql

blog posts about Tarql: https://www.bobdc.com/blog/tarql/, https://thecaglereport.com/2021/05/18/using-tarql-to-convert-excel-spreadsheets-to-rdf/, https://www.bobdc.com/blog/sparqlcsvjoin/

requires java 1.8 or abve

git clone https://github.com/cygri/tarql

brew install maven //On my mac linux different

mvn clean install -DskipTests //Make sure to be in the tarql/ directory


// probably be good to add the `/target/appassembler/bin/` to PATH so it can be used anywhere

### testing

cd target/appassembler //get to tarql executable


sh bin/tarql --ntriples ../../examples/sample-2.sparql ../../examples/TechCrunchcontinentalUSA.csv
sh bin/tarql ../../examples/sample-2.sparql ../../examples/TechCrunchcontinentalUSA.csv
sh bin/tarql ../../examples/sample-2.sparql ../../examples/TechCrunchcontinentalUSA.csv > ../../examples/outputs/test1.ttl
sh bin/tarql --ntriples ../../examples/sample-2.sparql ../../examples/TechCrunchcontinentalUSA.csv > ../../examples/outputs/test1.rdf
sh bin/tarql ../../examples/sample-arsenal-table_2.sparql ../../examples/arsenal_table_2.csv > ../../examples/outputs/arsenal.ttl

tarql /Users/kai/Desktop/software/tarql/examples/sample-2.sparql /Users/kai/Desktop/software/tarql/examples/TechCrunchcontinentalUSA.csv

in ~/Desktop/scratch/planet_microbe/planet_microbe_functional_annotation_scripts/triples

in test1

Run tarql --tabs mini_test_go_out.sparql mini_test_go_out.tsv > mini_test_go_out.ttl //original csv version with just go term and count

in test2

tarql --tabs --dedup 100 mini_test_go_out_sample.sparql mini_test_go_out_sample.tsv > mini_test_go_out_sample.ttl

in test3

tarql -H --tabs --dedup 100 test2.sparql test_headerless.tsv > test3.ttl

Tarql is actually built using the Jena toolkit (ARQ), which means that it has many of the same capabilities and limitations that the Jena/Fuseki2 RDF server has, and can be extended in the same way that ARQ can (see https://jena.apache.org/documentation/query/library-function.html for details about the ARQ extension library).

For RDF queries (I'm pretty sure this is what I used in my masters).

Tripple store, Peter said to use tbd2. TDB2

Expose triples as a SPARQL end-point accessible over HTTP. Peter said to use most recent Fuseki as a front end for data management (along with TBD).

Clone this wiki locally