Revision 9643
Added by Aaron Marcuse-Kubitza over 11 years ago
inputs/GBIF/raw_occurrence_record/run | ||
---|---|---|
81 | 81 |
|
82 | 82 |
use_local_remote |
83 | 83 |
local table="$target_stem" |
84 |
mysql <<'EOF' |
|
85 |
CREATE TABLE IF NOT EXISTS `herbaria_filter` ( |
|
84 |
if remaking; then mk_drop|mysql_ANSI; fi |
|
85 |
(benign_error=1 mysql <<'EOF' |
|
86 |
CREATE TABLE `herbaria_filter` ( |
|
86 | 87 |
`acronym` varchar(255) NOT NULL PRIMARY KEY |
87 | 88 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='from IH.vegpath.org?&Index+Herbariorum' |
88 | 89 |
EOF |
89 |
mysql_truncate
|
|
90 |
) || skip_table || return 0
|
|
90 | 91 |
for part in "${parts[@]}"; do |
91 | 92 |
append=1 mysql_import <"$top_dir"/herbaria_filter.$part.csv_ |
92 | 93 |
done |
Also available in: Unified diff
inputs/GBIF/raw_occurrence_record/run: herbaria_filter/make(): skip table if already exists (unless remaking), like plant_fraction/make()