Project

General

Profile

1 4395 aaronmk
#!/bin/sh
2
# Creates analytical DB
3
4
selfDir="$(dirname -- "$0")"
5
6 6055 aaronmk
exec 2>>"$selfDir/../inputs/analytical_db/logs/make_analytical_db.log.sql" >&2
7 6047 aaronmk
8 6054 aaronmk
(set -x; date)
9 6048 aaronmk
10 6054 aaronmk
(set -x; "$selfDir/psql_verbose_vegbien" <<EOF
11 6053 aaronmk
TRUNCATE geoscrub_input;
12
INSERT INTO geoscrub_input SELECT * FROM geoscrub_input_view;
13
14 6042 aaronmk
SELECT make_family_higher_plant_group();
15 6085 aaronmk
TRUNCATE threatened_taxonlabel;
16
INSERT INTO threatened_taxonlabel SELECT * FROM threatened_taxonlabel_view;
17 6042 aaronmk
18
TRUNCATE analytical_stem;
19
INSERT INTO analytical_stem SELECT * FROM analytical_stem_view;
20
TRUNCATE analytical_aggregate;
21
INSERT INTO analytical_aggregate SELECT * FROM analytical_aggregate_view;
22
EOF
23 6056 aaronmk
)