Revision 9661
Added by Aaron Marcuse-Kubitza over 11 years ago
inputs/GBIF/raw_occurrence_record/run | ||
---|---|---|
80 | 80 |
local table="$target_stem" |
81 | 81 |
if remaking; then mk_drop|mysql_ANSI; remake=; fi |
82 | 82 |
|
83 |
local parts=(ih plant_fraction)
|
|
84 |
for part in "${parts[@]}"; do herbaria_filter.$part.csv_/make; done
|
|
83 |
herbaria_filter.ih.csv_/make
|
|
84 |
plant_fraction_for_herbaria_filter/make
|
|
85 | 85 |
|
86 | 86 |
(benign_error=1 mysql <<'EOF' |
87 | 87 |
CREATE TABLE `herbaria_filter` ( |
... | ... | |
89 | 89 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='from IH.vegpath.org?&Index+Herbariorum' |
90 | 90 |
EOF |
91 | 91 |
) || skip_table || return 0 |
92 |
for part in "${parts[@]}"; do |
|
93 |
append=1 mysql_import <"$top_dir"/herbaria_filter.$part.csv_ |
|
94 |
done |
|
92 |
mysql_ANSI <<EOF |
|
93 |
INSERT INTO "herbaria_filter" |
|
94 |
SELECT institution_code FROM plant_fraction_for_herbaria_filter |
|
95 |
EOF |
|
96 |
append=1 mysql_import <"$top_dir"/herbaria_filter.ih.csv_ |
|
95 | 97 |
} |
96 | 98 |
|
97 | 99 |
func_override table.tsv/make__src_table_run |
Also available in: Unified diff
inputs/GBIF/raw_occurrence_record/run: herbaria_filter/make(): use the plant_fraction_for_herbaria_filter view directly instead of first exporting it to a CSV