diff 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
line wrap: on
line diff
--- a/etl/src/main/resources/sql/flys-common.properties	Sun May 12 18:13:50 2013 +0200
+++ b/etl/src/main/resources/sql/flys-common.properties	Mon May 13 10:05:22 2013 +0200
@@ -46,7 +46,7 @@
         dt.bfg_id      AS bfg_id \
     FROM discharge_tables dt \
     LEFT OUTER JOIN time_intervals ti ON dt.time_interval_id = ti.id \
-    WHERE gauge_id = :gauge_id
+    WHERE dt.gauge_id = :gauge_id AND dt.kind = 1
 select.gauge.master.discharge.table = \
     SELECT \
         dt.id AS id, \

http://dive4elements.wald.intevation.org