Project

General

Profile

« Previous | Next » 

Revision 9780

inputs/GBIF/raw_occurrence_record_plants/run: herbaria_filter/make(): use new ih_herbarium table instead of the herbaria_filter.ih.csv_ file directly

View differences:

inputs/GBIF/raw_occurrence_record_plants/run
93 93
	local table="$target_stem"
94 94
	if remaking; then mk_drop|mysql; fi
95 95
	
96
	herbaria_filter.ih.csv_/make
96
	ih_herbarium/make
97 97
	plant_fraction_for_herbaria_filter/make
98 98
	
99 99
	(benign_error=1 mysql <<'EOF'
100 100
CREATE TABLE `herbaria_filter` (
101 101
 `institution_code` varchar(255) NOT NULL PRIMARY KEY
102
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='contains all of IH.vegpath.org?&Index+Herbariorum'
102
) ENGINE=MyISAM DEFAULT CHARSET=utf8
103 103
EOF
104 104
) || skip_table || return 0
105
	
106
	time (
107 105
	mysql <<EOF
108
INSERT INTO "herbaria_filter"
106
INSERT IGNORE INTO $table
107
SELECT institution_code FROM ih_herbarium
108
;
109
INSERT IGNORE INTO $table
109 110
SELECT institution_code FROM plant_fraction_for_herbaria_filter
111
;
110 112
EOF
111
	append=1 mysql_import <"$top_dir"/herbaria_filter.ih.csv_
112
	) || return
113 113
}
114 114

  
115 115
herbaria_filter/seal()

Also available in: Unified diff