Skip to content

Latest commit

 

History

History
executable file
·
47 lines (33 loc) · 1.15 KB

index.md

File metadata and controls

executable file
·
47 lines (33 loc) · 1.15 KB

Raw Data Store

This section documents the processes involved in pushing data from the BHT-EMR-API's database to the Raw Data Store(RDS). The BHT-EMR-API provides two mechanisms for this, namely:

  1. Push - This is a script that simply polls the database for changes and pushes them to the RDS using CouchDB as a transport layer.
  2. Dump - This generates data dumps from the database that can be manually loaded into RDS.

Configuring RDS

  • Pending

Running

  1. Push

    To start the push process run:

    bin/rails r bin/rds_push.rb
  2. Dump

    Dumping is two-fold, incremental and all. The incremental data dump is generated starting off from where either rds_push or itself left off when last run. The all dump on the other hand covers all records in the database. NOTE: The dumps generated by the commands described below are saved to log/rds_dump.sql.

    To generate incremental data dumps do:

    bin/rails r bin/rds_dump.rb

    To generate the all data dump do:

    bin/rails r bin/rds_dump.rb --all