Project

General

Profile

« Previous | Next » 

Revision 9772

inputs/GBIF/raw_occurrence_record_plants/run: added table/make(), which makes the filter view

View differences:

inputs/GBIF/raw_occurrence_record_plants/run
102 102
	table=herbaria_filter table_esc= mysql_seal_table
103 103
}
104 104

  
105
table/make() # makes the filter view
106
{
107
	echo_func; set_make_vars; mk_table_esc
108
	
109
	plant_fraction/make
110
	use_local_remote
111
	if remaking; then
112
		table=plant_fraction_for_herbaria_filter table_esc= mk_drop|mysql_ANSI
113
	fi
114
	(benign_error=1 mysql <<EOF
115
CREATE VIEW $table AS
116
SELECT * FROM $full_table
117
WHERE deleted IS NULL
118
AND institution_code IN (SELECT * FROM herbaria_filter)
119
EOF
120
) || table=plant_fraction_for_herbaria_filter skip_table || return 0
121
}
122

  
105 123
# table.tsv.gz/make() runtime: 35 min ("34m55.802s")
106 124

  
107 125
func_override table.tsv/make__src_table_run

Also available in: Unified diff