Skip to content

Repository database overview

Patrick Titzler edited this page Aug 29, 2016 · 3 revisions

The service creates a small repository database named transform_ in the CouchDB instance identified by environment variable TARGET_COUCH_DB_URL during startup.

Two views are defined in this database:

repository/events

This view lists event processing documents, such as application starts:

{
  "...": "...",
  "task_id": "3b8d84479d918efa7cb2e27ae2767260",
  "record_type": "event",
  "event_type": "start",
  "data": {
    "source": {
      "url": "https://[email protected]/",
      "dbname": "my_source_db"
    },
    "target": {
      "url": "https://[email protected]/",
      "dbname": "my_target_db"
    }
  },
  "timestamp": "2016-08-29T21:57:46.627Z"
}

The task_id is an MD5 hash, identifying the unique combination of source/target database.

repository/recovery

This view returns one recovery document for each unique source-db/target-db combination. Recovery documents are updated every time a batch of transformed documents was successfully written to the target database.

Clone this wiki locally