Revision 9626
Added by Aaron Marcuse-Kubitza over 11 years ago
inputs/GBIF/raw_occurrence_record/run | ||
---|---|---|
17 | 17 |
echo_func; set_make_vars; mk_table_esc |
18 | 18 |
|
19 | 19 |
use_local_remote |
20 |
mysql <<'EOF' |
|
21 |
CREATE TABLE IF NOT EXISTS `plant_fraction` (
|
|
20 |
(benign_error=1 mysql <<'EOF'
|
|
21 |
CREATE TABLE `plant_fraction` ( |
|
22 | 22 |
`institution_code` varchar(255) NOT NULL PRIMARY KEY, |
23 | 23 |
`plant_fraction` float NOT NULL |
24 | 24 |
) |
25 | 25 |
EOF |
26 |
table=plant_fraction table_esc= mysql_truncate
|
|
26 |
) || table=plant_fraction skip_table || return 0
|
|
27 | 27 |
mysql_ANSI <<EOF |
28 | 28 |
INSERT INTO "plant_fraction" |
29 | 29 |
SELECT |
Also available in: Unified diff
inputs/GBIF/raw_occurrence_record/run: plant_fraction.table/make(): only create and populate the table if it doesn't already exist, to avoid clobbering existing data. the noclobber functionality uses new skip_table(), which is the table analog of require_not_exists().