-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
During the chemistry orphan investigation (related to #438), we identified that 1,586 downstream chemistry records cannot transfer because their parent locations have site types that don't exist in the thing_type lexicon.
Missing Site Types
| SiteType Code | Suggested thing_type | Locations | Downstream Records |
|---|---|---|---|
| D | drain | 16 | 452 |
| L | lake | 10 | 576 |
| S | seep | 10 | 20 |
| R | reservoir | 9 | 18 |
| O | other | 5 | 183 |
| OT | other | 3 | 337 |
| Total | 53 | 1,586 |
Current State
The existing thing_type lexicon values are:
- water well
- spring
- perennial stream
- ephemeral stream
- meteorological station
Tasks
-
Add new
thing_typelexicon entries:drainlakeseepreservoirother(for O and OT site types)
-
Add transfer functions in
transfers/thing_transfer.pyfor each new site type (similar to existingtransfer_springs,transfer_perennial_stream, etc.) -
Wire up new transfer functions in
transfers/transfer.py -
Re-run chemistry transfers to verify 1,586 records are recovered
Related
- 424 orphan chemistry records should be investigated in source database #438 - Source database should reconcile ~160k orphan records
- WellData and Location (anything that becomes a Thing) children should have enforced FK associations with orphan prevention #363 - FK enforcement for Thing children
Impact
After this is complete, the only remaining chemistry orphans will be 424 records (13 locations) that have no source Location record in the legacy database.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels