Project

General

Profile

1
#!/bin/sh
2
# Creates analytical DB
3

    
4
selfDir="$(dirname -- "$0")"
5

    
6
exec 2>>"$selfDir/../inputs/analytical_db/logs/make_analytical_db.log.sql" >&2
7

    
8
(set -x; date)
9

    
10
(set -x; "$selfDir/psql_verbose_vegbien" <<EOF
11
TRUNCATE geoscrub_input;
12
INSERT INTO geoscrub_input SELECT * FROM geoscrub_input_view;
13

    
14
SELECT make_family_higher_plant_group();
15
TRUNCATE threatened_taxonlabel;
16
INSERT INTO threatened_taxonlabel SELECT * FROM threatened_taxonlabel_view;
17

    
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
)
(33-33/66)