Changes between Version 8 and Version 9 of drmsSubscribe


Ignore:
Timestamp:
02/18/15 11:18:52 (10 years ago)
Author:
joe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • drmsSubscribe

    v8 v9  
    147147If given with just a series name, it will emit the SQL commands to create a trigger that retrieves all updates for observations within the last 14 days.  Specifying a cadence will allow you to retrieve observations at lower than the full data rate.  Note that only SQL is emitted to STDOUT, so that you can redirect this cleanly to a file.  Warnings and other messages are emitted to STDERR. 
    148148 
     149'''WARNING''' : a `DROP TRIGGER` is right before the `CREATE TRIGGER` as you can't set up a `CREATE OR REPLACE TRIGGER` in Postgres.  You may get an message similar to to `ERROR:  trigger "hmi_ic_720s_trg" for table "ic_720s" does not exist`.  
     150 
    149151{{{ 
    150152[oneiros@sdo3 db_triggers]$ ./sunum_queue_trigger_sampled.pl hmi.v_720s 
     
    184186To speed searching for data, the VSO generates a materialized view that we refer to as the 'shadow tables'.  These tables are keep up-to-date with the DRMS series table via a trigger.  There are two scripts to build the SQL commands necessary, both in CVS: 
    185187`vso/DataProviders/JSOC/db_triggers/shadow_aia_template.pl` and `vso/DataProviders/JSOC/db_triggers/shadow_hmi_template.pl`.  They take a series name as an argument.  Note that only SQL is emitted to STDOUT, so that you can redirect this cleanly to a file.  Warnings and other messages are emitted to STDERR. 
     188 
     189The `UPDATE` at the end will force the trigger to run for the entire table.  This process takes a few minutes for HMI tables, and likely multiple hours for AIA.lev1. 
     190 
     191'''WARNING''' : a `DROP TRIGGER` is right before the `CREATE TRIGGER` as you can't set up a `CREATE OR REPLACE TRIGGER` in Postgres.  You may get an message similar to to `ERROR:  trigger "trig_update_vso_hmi__v_720s" for table "ic_720s" does not exist`. ** 
     192 
    186193 
    187194{{{ 
     
    291298UPDATE hmi.v_720s SET recnum=recnum; 
    292299}}} 
    293