0

I am looking a way to remove a propertyKey in the schema. The documentation here explains how to add properties but no information about the removal. Does that mean that it is not possible?

Since DataStax relies on Cassandra that supports table altering I guess there is some way to achieve that, otherwise how to deal with dynamic schemas where properties can be added or removed?

Edit: For more clarity I want to remove the property both in the schema and in the data. Exactly like the ALTER DROP in SQL:

ALTER TABLE table_name
DROP COLUMN column_name
Aymeric
  • 906
  • 9
  • 20

2 Answers2

1

The DSE Graph reference for dropping data, schema or graphs is: http://docs.datastax.com/en/latest-dse/datastax_enterprise/graph/using/dropSchemaDataStudio.html

polandll
  • 86
  • 4
  • I am looking to remove a single propertyKey specifically. The link you provided does not explain how to do that. – Aymeric Jul 28 '16 at 09:00
  • 1
    The docs above contain the following note, if you need to modify the schema then you need to run schema.clear() and regenerate the schema. "Important: Currently, certain schema elements such as a vertex label cannot be individually modified or removed. If a change to the schema is necessary, drop the whole schema as detailed above and recreate." – peytoncas Aug 05 '16 at 05:18
0

As DSE Graph is built on the standards of TinkerPop, you can also leverage the TinkerPop 3 API references here - http://tinkerpop.apache.org/docs/current/reference/#_tinkerpop3.

For this item, i believe you are looking for .drop(). http://tinkerpop.apache.org/docs/current/reference/#drop-step

From the above link, if you want to remove a property, do this: .properties("X").drop()

jlacefie
  • 614
  • 3
  • 5