create

Synopsis

system.graph('graph_name').create()

Description

Create a new graph. The graph_name specified is used to create two DSE database keyspaces, graph_name and graph_name_system, and can only contain alphanumeric and underscore characters.

Examples

Create a new graph.

gremlin> system.graph('FridgeItem').create()

The resulting list:

==>FridgeItem

Create a new graph if it doesn’t currently exist by modifying with ifNotExists().

gremlin> system.graph('FridgeItem').ifNotExists().create()

The resulting list:

==>FridgeItem

Creating a graph should include setting the replication factor for the graph and the graph_system. It can also include other options.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com