-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unique_keys to FunctionalAnnotationAggMember
class
#2155
Comments
@aclum - should I implement this in microbiomedata#242? Seems like a logical time and place to implement. |
Yes, that would be great. |
FunctionalAnnotationAggMember
class
@sierra-moxon and I have determined that uniqueness across objects is not supported in JSONSchema, and because linkml-validate uses the jsonschema serialization of the model to do validation, it is not checking the unique keys constraint. So while we could add a |
Is there an issue filed in the linkml repo for this? |
https://github.com/orgs/linkml/discussions/2409 - our discussion centers around how to specify in the data model (nmdc-schema) that a unique index must be created in the implementation data store. In PostgreSQL this would be a unique index underlying a unique constraint. In MongoDB, this would be a unique index. In JSONSchema there is no such thing. Being able to use our test/run-examples methodology in the nmdc-schema repo to do validation across data instances as a set without recapitulating the underlying data store (MongoDB) might be more of an architecture/DevOps issue than something easily solvable with LinkML, though. (we could explore using a tool called linkml-store that can easily spin up a MongoDB instance -- maybe we populate it with example data -- just brainstorming here...). This issue is the mechanism that Katherine mentioned above. We don't have an automated way to generate indexes in MongoDB based on some parameter(s) from the schema (is this correct? do we currently generate MongoDB indexes manually and as needed?). And we don't currently spin up an instance of MongoDB in the nmdc-schema repo, to verify that the indexes we specified are working as planned. (is this correct - I imagine to test a migrator, we spin up a local MongoDB instance, but that local MongoDB instance doesn't interact with the examples runner in the schema) |
cc @shreddd |
We can use https://w3id.org/linkml/unique_keys to specify which two slots make up a unique key for this class, see microbiomedata/nmdc-runtime#611 and notes from 8/8/24 infrastructure meeting.
The text was updated successfully, but these errors were encountered: