diff --git a/config/modules/rprh.sql b/config/modules/rprh.sql index 456b1a4..c4accb9 100644 --- a/config/modules/rprh.sql +++ b/config/modules/rprh.sql @@ -53,4 +53,8 @@ SELECT NWPDAT AS nwpdat, NWPTIM AS nwptim FROM LGDAT.RPRH +-- NWPDAT is 0001-01-01 until the batch posts, so the watermark branch alone can +-- never see an in-flight batch -- it only appears once posting stamps a real +-- date. Only 4 rows are unposted, so the whole set comes over every run. WHERE NWPDAT >= DATE('{stamp}') + OR RTRIM(NWPOST) <> 'Y'