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

    
16
TRUNCATE analytical_stem;
17
INSERT INTO analytical_stem SELECT * FROM analytical_stem_view;
18
TRUNCATE analytical_aggregate;
19
INSERT INTO analytical_aggregate SELECT * FROM analytical_aggregate_view;
20
EOF
21
)
(32-32/63)