frontendtailfeather
frontendtailfeather

Reputation: 1

How do you create a keyspace using Stargate GraphQL in the Astra Cassandra Service

With OSS Stargate I can create a keyspace using

mutation createKsLibrary {
  createKeyspace(name:"library", replicas: 1)
}

with Astra I get

"Exception while fetching data (/createKeyspace) : org.apache.cassandra.stargate.exceptions.UnauthorizedException: User has no CREATE permission on <all keyspaces> or any of its parents",

Upvotes: 0

Views: 132

Answers (2)

Kirsten Jones
Kirsten Jones

Reputation: 2706

Another possibility is to use the Astra CLI, which does handle some of the non-Stargate cases like creating a keyspace.

Check it out at https://docs.datastax.com/en/astra-cli/docs/0.2/index.html

Upvotes: 0

dwettlaufer
dwettlaufer

Reputation: 378

Although OSS Stargate does support keyspace creation, for Astra you'll actually need to use the UI for this. To do so you'll want to open your database and then scroll down and click the "Add Keyspace" button on the right hand side.

Add Keyspace

Docs:

https://docs.astra.datastax.com/docs/managing-keyspaces https://docs.astra.datastax.com/docs/datastax-astra-guardrails

Upvotes: 3

Related Questions