This is an old revision of the document!
Propagate Qc2 Data Downstream
These notes have been compiled in relation to investigations of https://kvoss.bugs.met.no/show_bug.cgi?id=1298.
kv2kl-Qc2test setup to run on dev-vm128 (or somewhere ???…. ) and retrieve data from dev-vm101 and send it to dev-vm116.
*Observation*
dev-vm101
kvalobs@dev-vm101:~$ psql Welcome to psql 8.3.3, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit kvalobs=# select * from data where stationid=64330 and obstime='2010-11-01 11:00:00' and paramid=211; stationid | obstime | original | paramid | tbtime | typeid | sensor | level | corrected | controlinfo | useinfo | cfailed -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+---------- 64330 | 2010-11-01 11:00:00 | -32767 | 211 | 2010-11-01 11:30:25 | 311 | 0 | 0 | 4.2 | 0000001100000000 | 6894900000000000 | QC2d-2 (1 row)
dev-vm116:
kvalobs@dev-vm116:~$ psql kvalobs Welcome to psql 8.3.5, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit kvalobs=# select * from kv2klima where cfailed like '%QC2%; kvalobs'# kvalobs=# select * from kv2klima where cfailed like '%QC2%'; kvalobs=# select * from kv2klima where cfailed like '%QC2%' and stationid=64330; ERROR: column "stationid" does not exist LINE 1: ...ct * from kv2klima where cfailed like '%QC2%' and stationid=... ^ kvalobs=# select * from kv2klima where cfailed like '%QC2%' and stnr=64330; stnr | dato | typeid | paramid | sensor | xlevel | original | corrected | useinfo | para_name | year | kvstamp | klstamp | old_name | controlinfo | cfailed -------+---------------------+--------+---------+--------+--------+----------+-----------+------------------+-----------+------+---------------------+----------------------------+----------+------------------+---------- 64330 | 2010-11-01 11:00:00 | 311 | 211 | 0 | 0 | -32767.0 | 4.2 | 6894900000000000 | | | 2010-11-01 11:30:25 | 2010-11-01 16:28:27.028156 | | 0000001100000000 | QC2d-2 (1 rad)
murky:
kvalobs@murky:~$ psql kvalobs Welcome to psql 8.3.3, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit kvalobs=# select * from data where stationid=64330 and obstime='2010-11-01 11:00:00' and paramid=211; stationid | obstime | original | paramid | tbtime | typeid | sensor | level | corrected | controlinfo | useinfo | cfailed -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------- 64330 | 2010-11-01 11:00:00 | 3.6 | 211 | 2010-11-01 10:53:28 | 311 | 0 | 0 | 3.6 | 0111100000000010 | 7000000000000000 | (1 row)
This looks like it worked … i.e. it did not come from murky! But we fiddled with HQC at the end of the day and did this trigger the transfer?
Yes it works!
The following contains a mixture of output (note before and after comman bug fix too!)
kvalobs=# select stnr,cfailed,dato,kvstamp,klstamp,paramid from kv2klima where dato between '2010-11-02 04:00:00' and '2010-12-01' and cfailed like '%QC2%'; stnr | cfailed | dato | kvstamp | klstamp | paramid -------+---------------------------------------------+---------------------+---------------------+----------------------------+--------- 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 09:16:11.74845 | 262 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 09:16:11.749468 | 213 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 09:16:11.750993 | 178 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 09:16:11.75226 | 211 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 09:16:11.753643 | 215 17850 | QC2d-2,comma-check | 2010-11-02 09:00:00 | 2010-11-02 09:30:11 | 2010-11-02 15:25:03.21991 | 215 17850 | QC2d-2 comma check | 2010-11-02 09:00:00 | 2010-11-02 09:30:11 | 2010-11-02 15:25:03.220992 | 211 17850 | QC2d-2,comma-check | 2010-11-02 09:00:00 | 2010-11-02 09:30:11 | 2010-11-02 15:26:00.685493 | 215 17850 | QC2d-2 comma check | 2010-11-02 09:00:00 | 2010-11-02 09:30:11 | 2010-11-02 15:26:00.686509 | 211 76750 | QC1-1-178:1,QC1-1-178x:1,QC2d-2 | 2010-11-02 10:00:00 | 2010-11-02 09:53:15 | 2010-11-02 15:27:17.934638 | 178 76750 | QC1-1-211:1,QC1-1-211x:1 QC2d-2 comma check | 2010-11-02 10:00:00 | 2010-11-02 09:53:15 | 2010-11-02 15:27:17.935708 | 211 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 15:27:39.226109 | 104 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 15:27:39.227082 | 262 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 15:27:39.228054 | 213 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 15:27:39.22904 | 178 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 15:27:39.230223 | 211 89940 | QC2d-2 | 2010-11-02 04:00:00 | 2010-11-02 04:30:17 | 2010-11-02 15:27:39.231342 | 215 89940 | QC2d-2,comma-check | 2010-11-02 10:00:00 | 2010-11-02 10:30:20 | 2010-11-02 15:27:39.337016 | 215 89940 | QC2d-2 | 2010-11-02 10:00:00 | 2010-11-02 10:30:20 | 2010-11-02 15:27:39.338129 | 178 89940 | QC2d-2 comma check | 2010-11-02 10:00:00 | 2010-11-02 10:30:20 | 2010-11-02 15:27:39.340064 | 211 (20 rows)