comparison etl/src/main/resources/sql/flys-common.properties @ 5995:3bb6c2a3ef72

River ETL: Limit the discharge tables to load to the historical (kind = 1) ones. This prevents the wrong tables (values) to be deleted.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 13 May 2013 10:05:22 +0200
parents 33e514a0c6b7
children 60f39ee19473
comparison
equal deleted inserted replaced
5994:af13ceeba52a 5995:3bb6c2a3ef72
44 ti.start_time AS start_time, \ 44 ti.start_time AS start_time, \
45 ti.stop_time AS stop_time, \ 45 ti.stop_time AS stop_time, \
46 dt.bfg_id AS bfg_id \ 46 dt.bfg_id AS bfg_id \
47 FROM discharge_tables dt \ 47 FROM discharge_tables dt \
48 LEFT OUTER JOIN time_intervals ti ON dt.time_interval_id = ti.id \ 48 LEFT OUTER JOIN time_intervals ti ON dt.time_interval_id = ti.id \
49 WHERE gauge_id = :gauge_id 49 WHERE dt.gauge_id = :gauge_id AND dt.kind = 1
50 select.gauge.master.discharge.table = \ 50 select.gauge.master.discharge.table = \
51 SELECT \ 51 SELECT \
52 dt.id AS id, \ 52 dt.id AS id, \
53 dt.bfg_id AS bfg_id \ 53 dt.bfg_id AS bfg_id \
54 FROM discharge_tables dt JOIN gauges g ON dt.gauge_id = g.id \ 54 FROM discharge_tables dt JOIN gauges g ON dt.gauge_id = g.id \

http://dive4elements.wald.intevation.org