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

SHOW CURRENT_GRAPH command

The SHOW CURRENT_GRAPH command returns information about the graph or the temporary graph in the current session. The graph or temporary graph in the current session acts as the working graph if no USE clause is specified in DQL statements.

The returned results may vary depending on the graph or the temporary graph that is set for the current session and the home graph that is set for the current user:

  • If either a graph or a temporary graph is set for the current session using SESSION SET, the result displays information about the graph or the temporary graph that is set for the current session.
  • If neither a graph nor a temporary graph is set for the current session, but a home graph is set for the current user, the result displays information about the home graph.
  • If neither a graph nor a temporary graph is set for the current session, nor a home graph is set for the current user, the result is empty.
  • If the persistent graph in the current session belongs to a schema on which the current user no longer has USAGE, the result is empty. Temporary graphs are not affected.

For more information, see Schema access control.

The following table describes the returned information:

Column Description
name The name of the graph or temporary graph in the current session.
graph_type The type of the graph or temporary graph in the current session.
schema The path of the schema where the graph or temporary graph in the current session belongs.
owner The owner of the graph or temporary graph in the current session.
extra Additional information. For graphs, no additional information is provided. For temporary graphs, the value indicates whether the temporary graph is created in distributed mode. For more information, see CREATE TEMPORARY GRAPH.

Syntax

show_current_graph_command
SHOW CURRENT_GRAPH

show_current_graph_command ::=
    'SHOW' 'CURRENT_GRAPH'

Examples

The following examples are based on the schema /my_schema and the graph my_graph created and set in the Examples section of SESSION SET.

SHOW CURRENT_GRAPH

Return:

+----------+---------------+------------+-------+-------+
| name     | graph_type    | schema     | owner | extra |
+----------+---------------+------------+-------+-------+
| my_graph | my_graph_type | /my_schema | root  |       |
+----------+---------------+------------+-------+-------+