Leo Rodríguez
Leo Rodríguez

Reputation: 309

ArangoDB - How to set sharding key of a vertex collection with python-arango driver?

I'm using joowani/python-arango driver to create a graph and populate it with data. I have checked that db.create_collection method has a property called "shard_fields" to set the sharding keys. But graph.create_vertex_collection does not support setting sharding keys. Is there any way to set sharding keys for vertex collections?

Thanks in advance.

Upvotes: 2

Views: 153

Answers (1)

Kaveh Vahedipour
Kaveh Vahedipour

Reputation: 3477

You may always create your collections using an HTTP POST call to _api/collection. This is not a solution but a workaround. In the meantime, I'll see if I can create a pull request with a fix.

Find the documentation for the API here: https://docs.arangodb.com/3.11/develop/http/collections/#create-a-collection

Upvotes: 1

Related Questions