factsmission / synospecies

Using Plazi Data to find currently accepted scientific names
https://synospecies.plazi.org/
MIT License
5 stars 1 forks source link

Full update ld.plazi triplestore #131

Closed retog closed 2 months ago

retog commented 5 months ago
          > @retog after quick investigation I found that some of these wrong authorities are no longer in treatments-rdf, but that change seems not to have been picked up by treatment.ld.plazi.org

(compare also the results of this search with the Lindas endpoints, which are more up to date it seems)

can you figure out how to efficiently reimport all data into treatment.ld.plazi.org?

This should be feasible using the SARQL GraphStore protocol, anallogously to how this is done for lindas:

#!/usr/bin/env bash
set -eo pipefail

set +u
ENDPOINT=${ENDPOINT:=https://stardog-test.cluster.ldbar.ch/lindas}
set -u

cat input/col.nt > upload.nt
cat input/data.nt >> upload.nt

echo "Posting to endpoint: $ENDPOINT"
curl -n \
     --netrc-file config/dot.netrc \
     -X PUT \
     --http1.1 \
     -H Content-Type:application/n-triples \
     -T upload.nt \
     -G $ENDPOINT \
     --data-urlencode graph=https://lindas.admin.ch/foen/plazi

echo "Executing post-insert SPARQL on endpoint: $ENDPOINT/update"
curl -D - -n \
     --netrc-file config/dot.netrc \
     -X POST \
     --http1.1 \
     -H Content-Type:application/sparql-update \
     -T scripts/post-insert.sparql \
     -G $ENDPOINT/update

Originally posted by @retog in https://github.com/factsmission/synospecies/issues/129#issuecomment-2002031883