-
Notifications
You must be signed in to change notification settings - Fork 6
Milestone
Description
Add real-time referential integrity checking to the apply_metadata_in Dagster job.
Relevant code
nmdc-runtime/nmdc_runtime/site/graphs.py
Lines 129 to 133 in d380b25
| @graph | |
| def apply_metadata_in(): | |
| outputs = perform_mongo_updates(get_json_in()) | |
| add_output_run_event(outputs) | |
| materialize_alldocs() |
The perform_mongo_updates function uses validate_json under the hood:
nmdc-runtime/nmdc_runtime/site/ops.py
Lines 537 to 539 in d380b25
| rv = validate_json( | |
| docs, mongo.db | |
| ) # use *exact* same check as /metadata/json:validate |
Nowadays, the validate_json function has a Boolean parameter that enables real-time referential integrity checking. See the function's docstring for details.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status