As part of creating a toolkit developers can use to validate the contents of the NMDC Mongo database...
Implement a function(s) that developers can use to verify a given Mongo document's references to other Mongo documents—recursively—are intact (i.e. verify that the referenced Mongo document exists).
Notes:
The pymongo package offers a find function and a find_one function, which can be used to find document in a collection that meet specific criteria, such as having a specific id value.
As part of creating a toolkit developers can use to validate the contents of the NMDC Mongo database...
Implement a function(s) that developers can use to verify a given Mongo document's references to other Mongo documents—recursively—are intact (i.e. verify that the referenced Mongo document exists).
Notes:
pymongo
package offers afind
function and afind_one
function, which can be used to find document in a collection that meet specific criteria, such as having a specificid
value.This task originated as a subtask of https://github.com/microbiomedata/issues/issues/266.