Examining graphs

Graphs have characteristics that can be examined with a variety of commands.

Procedure

  • A list of all graphs can be retrieved with the following command:

    system.graphs()

    In Studio and Gremlin console, a list is retrieved, although the presentation is different. Here is a Gremlin console result:

    ==> food
    ==> test
  • A list of all graph and their attributes can be retrieved as well:

    system.list()
    ==>Name: food_cql | Engine: Core | Replication: {replication_factor=1, class=org.apache.cassandra.locator.SimpleStrategy}
    ==>Name: food_classic | Engine: Classic | Replication: {class=org.apache.cassandra.locator.NetworkTopologyStrategy, SearchGraphAnalytics=1}

    This result shows two different graphs, one with a Core engine and one with a Classic engine. The first listed graph was created without replication settings and defaulted to a replication factor of 1 and a SimpleStrategy.

  • To examine a particular graph, use the describe command:

    system.graph('food').describe()
    ==>system.graph('food').ifNotExists().withReplication("{'class': 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'SearchGraphAnalytics': '1'}").andDurableWrites(true).create()

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