Project

General

Profile

« Previous | Next » 

Revision 9779

inputs/GBIF/raw_occurrence_record_plants/run: added ih_herbarium/make(), which stores the IH herbaria

View differences:

inputs/GBIF/raw_occurrence_record_plants/run
14 14
to_target pg_export
15 15
}
16 16

  
17
ih_herbarium/make() # stores IH herbaria
18
{
19
	echo_func; set_make_vars
20
	
21
	use_local_remote
22
	local table="$target_stem"
23
	if remaking; then mk_drop|mysql; fi
24
	
25
	herbaria_filter.ih.csv_/make
26
	(benign_error=1 mysql <<'EOF'
27
CREATE TABLE `ih_herbarium` (
28
 `institution_code` varchar(255) NOT NULL PRIMARY KEY
29
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='from IH.vegpath.org?&Index+Herbariorum'
30
EOF
31
) || skip_table || return 0
32
	append=1 mysql_import <"$top_dir"/herbaria_filter.ih.csv_
33
}
34

  
17 35
plant_fraction/make() # runtime: 1 hr ("10603 rows affected (53 min 44.68 sec)")
18 36
{
19 37
	echo_func; set_make_vars; mk_table_esc

Also available in: Unified diff