changeset 5644:f432f578d7e7 DQR adjustments

WIP
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 14 Jun 2023 10:14:43 +0200
parents b4ee50490592
children 6fe970d800ec
files report-templates/data-quality-report.yaml
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/report-templates/data-quality-report.yaml	Wed Jun 14 10:08:25 2023 +0200
+++ b/report-templates/data-quality-report.yaml	Wed Jun 14 10:14:43 2023 +0200
@@ -17,9 +17,9 @@
           # BN names
           - type: select
             statement: >
-              SELECT DISTINCT objnam AS bnnam, hm
+              SELECT DISTINCT bottleneck_id, objnam AS bnnam, hm
                 FROM waterway.dqr_bottleneck_stats
-                WHERE cc = {{ cc }} ORDER BY hm, objnam;
+                WHERE cc = {{ cc }} ORDER BY hm, bottleneck_id, objnam;
             actions:
               - type: assign
                 name: last_row
@@ -49,10 +49,10 @@
               # BN SR-Count
               - type: select
                 statement: >
-                  SELECT objnam, srcnt, fwacnt
+                  SELECT concat(bottleneck_id, ' ', objnam), srcnt, fwacnt
                     FROM waterway.dqr_bottleneck_stats
                     WHERE cc = {{ cc }} AND month = {{ d }}
-                    ORDER BY hm, objnam;
+                    ORDER BY hm, bottleneck_id;
                 actions:
                   - type: assign
                     name: last_row