Skip to content

Commit

Permalink
Merge pull request #697 from sanger/update-readme-on-populating-data
Browse files Browse the repository at this point in the history
Update Readme
  • Loading branch information
dasunpubudumal authored Nov 14, 2024
2 parents 49d3924 + d04d10d commit 5218df3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@

A denormalised warehouse for multiple LIMS.

Populating a table in the warehouse is done asynchronously. This project is a Railtie application that facilitate asynchronous database population through a message queue. This application listens to a message queue, consumes the message, converts the message into a database model, and persists in the corresponding table.

Take the example below.

```json
{
"lims": "traction",
"aliquot": {
"id_lims": "LIMS123456",
"lims_uuid": "550e8400-e29b-41d4-a716-446655440000",
"aliquot_type": "DNA",
"source_type": "Blood",
"source_barcode": "SRC123456",
"sample_name": "SampleA",
"used_by_type": "Research",
"used_by_barcode": "USR123456",
"volume": 50,
"concentration": 200,
"last_updated": "2024-07-09T10:15:30Z",
"recorded_at": "2024-07-09T09:00:00Z",
"created_at": "2024-07-08T08:00:00Z",
"insert_size": 350
}
}
```

If the message above is consumed by `unified_warehouse`, it will create a new record in `aliquot` table with the values set to the given attributes. If an exception occur, it will dead-letter the message. For message serialization logic, please follow [`lib/payload.rb`](https://github.com/sanger/unified_warehouse/blob/beea89418cc1987c426e7967b7c13ff9218b51fb/lib/payload.rb#L31-L33).

## Usage (Development)

### Requirement
Expand Down

0 comments on commit 5218df3

Please sign in to comment.