-
Notifications
You must be signed in to change notification settings - Fork 7
/
transformSemOpenAlex.sh
executable file
·32 lines (26 loc) · 1.5 KB
/
transformSemOpenAlex.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# this script collects and run the following python scripts in sequentially
echo "SemOpenAlex transformation script started at: " $(date -u)
# Data transformation from OpenAlex to RDF data dump
# Running a series of python scripts one after another
python3 ./transformation-scripts/semopenalex-topics.py;
python3 ./transformation-scripts/semopenalex-subfields.py;
python3 ./transformation-scripts/semopenalex-fields.py;
python3 ./transformation-scripts/semopenalex-domains.py;
python3 ./transformation-scripts/semopenalex-keywords.py;
python3 ./transformation-scripts/semopenalex-concepts.py;
python3 ./transformation-scripts/semopenalex-funders.py;
python3 ./transformation-scripts/semopenalex-institutions.py;
python3 ./transformation-scripts/semopenalex-publishers.py;
python3 ./transformation-scripts/semopenalex-sources.py;
python3 ./transformation-scripts/semopenalex-authors.py;
python3 ./transformation-scripts/semopenalex-works.py;
python3 ./transformation-scripts/semopenalex-dataset.py;
# make sure to clean graphdb storage folder before ingesting data
rm -rf ./graphdb-preload/graphdb-home/data/repositories/metaphactory/storage
# load RDF data dump .gzip files to graphdb using preload tool
docker-compose -f ./graphdb-preload/docker-compose.yml up;
# gzip graphdb-home/ folder to transfrom to a dedicated server
echo "Started to tar.gz graphdb-home/ folder at: " $(date -u)
tar -czvf graphdb-home.tar.gz ./graphdb-preload/graphdb-home/
echo "SemOpenAlex transformation script ended at: " $(date -u)