-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathinit_triplestores.sh
More file actions
executable file
·18 lines (14 loc) · 1.19 KB
/
init_triplestores.sh
File metadata and controls
executable file
·18 lines (14 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## Script to initialize the triplestores started with docker
# Run it from the root of the repo: ./tests/resources/init_triplestores.sh
TRIPLES="
<https://identifiers.org/CHEBI:24867> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/biolink/vocab/ChemicalEntity> .
<https://identifiers.org/CHEBI:24868> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/biolink/vocab/ChemicalEntity> .
"
echo " 🪄 Load triples to Virtuoso and enable federated queries"
docker compose exec virtuoso isql -U dba -P dba exec='GRANT "SPARQL_SELECT_FED" TO "SPARQL";'
docker compose exec virtuoso isql -U dba -P dba exec="SPARQL INSERT IN <https://identifiers.org/CHEBI> { $TRIPLES };"
echo " ⚡️ Load triples to Blazegraph"
docker compose exec blazegraph curl -X POST http://localhost:8080/blazegraph/namespace/kb/sparql -d "update=insert data { $TRIPLES }"
echo " ☕️ Load triples to Fuseki"
docker compose exec fuseki curl -X POST -u admin:dba -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' 'http://localhost:3030/$/datasets' -d "dbName=mapping&dbType=tdb2"
docker compose exec fuseki curl -X POST http://localhost:3030/mapping -d "update=insert data { $TRIPLES }"