25.4 Querying and Visualizing PGQL Property Graphs

You can query and visualize PGQL property graphs in Graph Explorer.

  1. Expand PGQL Property Graphs in the left navigation pane.
  2. Expand the desired schema to view the list of PGQL property graphs to which you have access.
  3. Right click on a specific graph and click Generate Basic Query in the context menu.
    The basic PGQL SELECT query is auto-generated in the query editor for the selected graph. You can edit the query, if required.

    Alternatively, you can directly enter the PGQL query in the query editor.

    Also, note the following:

    • Graph Explorer allows you to run the following PGQL queries:
      • CREATE PROPERTY GRAPH: To create a new PGQL property graph.
      • DROP PROPERTY GRAPH: To drop a PGQL property graph.
      • SELECT: To query a PGQL propert graph.
      • INSERT, UPDATE, and DELETE: To modify a PGQL property graphs.
    • The name of the graph must be provided in the PGQL graph query.

      To copy it, right click on the graph and select Copy Graph Name from the context menu.

  4. Select PGQL driver in the query actions panel at the top of the query editor.
  5. Click Run Query.

Example 25-2 Creating a PGQL Property Graph

The following example shows creating a new PGQL property graph using the CREATE PROPERTY GRAPH statement.

Figure 25-4 Creating a PGQL Property Graph



Example 25-3 Modifying a PGQL Property Graph

The following example shows updating the amount value for an edge in the PGQL property graph.

Figure 25-5 Modifying a PGQL Property Graph



Example 25-4 Querying a PGQL Property Graph

The following example queries the PGQL property graph to show the transaction from account ID = 179 to account ID = 688.

Figure 25-6 Querying a PGQL Property Graph



Example 25-5 Dropping a PGQL Property Graph

The following example shows dropping the PGQL property graph using the DROP PROPERTY GRAPH statement.

Figure 25-7 Dropping a PGQL Property Graph