Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

DESCRIBE GRAPH

The DESCRIBE GRAPH command returns the name of the graph type based on which the graph or temporary graph was created.

Note

An operation involving a non-default schema or an object in it requires access to the schema, either implicitly or through an explicit USAGE grant, as well as the privilege required for the operation. The schema access check and the privilege check for the requested operation are independent; satisfying one does not satisfy the other. Schema access control does not apply to temporary graphs or built-in procedures and functions. For more information, see Schema access control.

Syntax

describe_graph_command
DESCRIBE DESC GRAPH schema_reference / graph_name temp_graph_name

describe_graph_command ::=
    ( 'DESCRIBE' | 'DESC' ) 'GRAPH' ((schema_reference '/')? graph_name | temp_graph_name)

Parameters

schema_reference

The reference to the path of the schema. It specifies the schema path of the graph to be described here.

Both absolute and relative schema paths can be used in the command. To describe a graph that resides outside the schema in the current session, the schema path must be specified. For information about setting and viewing the schema for the current session, see SESSION SET and SHOW CURRENT_SCHEMA.

graph_name

The name of the graph for which to return the graph type.

temp_graph_name

The name of the temporary graph for which to return the graph type. It must start with a number sign (#).

Examples

The following examples are based on the graph movie and the temporary graph #movie_temporary_graph created in CREATE GRAPH and CREATE TEMPORARY GRAPH respectively.

Describe a graph in the current schema

DESCRIBE GRAPH movie

Return:

+------------+-----------------+
| graph_name | graph_type_name |
+------------+-----------------+
| movie      | movie_type      |
+------------+-----------------+

Describe a graph in the specified schema

'''
// Create a schema
CREATE SCHEMA IF NOT EXISTS /my_schema 
'''

'''
// Set the schema for the current session
SESSION SET SCHEMA /my_schema
'''

'''
// Describe a graph in the specified
DESCRIBE GRAPH /default_schema/movie
'''

Return:

+------------+-----------------+
| graph_name | graph_type_name |
+------------+-----------------+
| movie      | movie_type      |
+------------+-----------------+

Describe a temporary graph

DESC GRAPH #movie_temporary_graph

Return:

+------------------------+-----------------+
| graph_name             | graph_type_name |
+------------------------+-----------------+
| #movie_temporary_graph | movie_type      |
+------------------------+-----------------+