Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

raktim.0526_188212 avatar image
raktim.0526_188212 asked ·

How do I remove an edge between two vertices from DSE schema?

We have an edge between two vertices in datastax graph(DSE 6.7).

How can I remove the edge from the schema itself?

I tried:

schema.edgeLabel("belongswithin").connection("poi", "region").drop()

but there is no drop method to delete an edge like this.

I can't run:

schema.edgeLabel("belongswithin").drop()

as I am having the same edge being used between the other two vertices which I don't want to drop?

dsegraph
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hello @raktim.0526_188212,

this has been asked and answered before in this post, and this is still the case for DSE 6.7, there is no change.

https://community.datastax.com/questions/438/how-to-remove-an-edge-between-two-vertices-from-ds.html

We can drop an edge from the schema, but not selectively a particular connection. You would need to drop the edge label and all its connections and recreate it with the needed connections, and this would require you to reload the data.

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

it is worth pointing out that dropping a specific connection for a particular edge label is now possible with DataStax Graph 6.8:

https://docs.datastax.com/en/dse/6.8/dse-dev/datastax_enterprise/graph/reference/schema/refSchemaDrop.html

1 Like 1 · ·
raktim.0526_188212 avatar image raktim.0526_188212 bettina.swynnerton ♦♦ ·

@bettina.swynnerton thank you for the answers.

0 Likes 0 · ·