GraphRAG: Wrap validate option as it needs atlasAdmin privileges

XMLWordPrintableJSON

    • Python Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      MongoDBGraphStore allows an option to validate syntax on insertion, but it requires "dbAdmin" and "atlasAdmin" privileges. Wrap the following in a try/except with a useful error message.

              if validate:
                  collection.database.command(
                      "collMod",
                      collection.name,
                      validator={"$jsonSchema": self._schema},
                      validationAction=validation_action,
                  )
      

      Note that one need not have admin privileges if validation is set when the collection is created, so this option should also be available to the user, including directions.

            Assignee:
            Casey Clements
            Reporter:
            Casey Clements
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: