Skip to content

Open in Explore

With the Open in Explore function, you can run nGQL statements on the Console page to query vertex or edge data and then view the result on the Explore page in a visualized way.

Studio version

Studio of v1.2.1-beta or later versions supports this function. To update the version, run this command.

docker-compose pull && docker-compose up -d

Prerequisites

To use the Open in Explore function, you must do a check of these:

  • The version of Studio is v1.2.1-beta or later.
  • Studio is connected to Nebula Graph.
  • A dataset exists in the database.

Query and visualize edge data

To query edge data on the Console page and then view the result on the Explore page, follow these steps:

  1. In the toolbar, click the Console tab.
  2. In the Current Graph Space field, choose a graph space name. In this example, mooc_actions is chosen.
  3. In the input box, enter an nGQL statement and click the button Icon of Run.

    NOTE: The queried result must contain the VIDs of the source vertex and the destination vertex of an edge.

    Here is an nGQL statement example.

    nebula> GO FROM 56 OVER action YIELD action._src, action._dst;
    

    The queried result gives the edges between the user with ID 56 and the courses that he/she takes on the MOOC platform, as shown in this figure.

    The Result window shows the queried edge data, including the VIDs of the source vertex and the destination vertex

  4. Click the Open in Explore button.

  5. In the dialog box, configure as follows:
    a. Click Edge Type.
    b. In the Edge Type field, enter an edge type name. In this example, action is used.
    c. In the Src ID field, choose a column name from the result table representing the VIDs of the source vertices. In this example, action._src is chosen.
    d. In the Dst ID field, choose a column name from the result table representing the VIDs of the destination vertices. In this example, action._dst is chosen.
    e. (Optional) If the result table contains the ranking information of the edges, in the Rank field, choose a column name representing the rank of the edges. If no ranking information exists in the result, leave the Rank field blank.
    f. When the configuration is done, click the Import button.

    The dialog box for you to configure the edge data

  6. (Optional) If some data exists on the board of Explore, choose a method to insert data:

    • Incremental Insertion: Click this button to add the result to the existing data on the board.
    • Insert After Clear: Click this button to clear the existing data from the board and then add the data to the board.

When the data is inserted, you can view the visualized representation of the edge data.

The edge data is represented on the Explore board

Query and visualize vertex data

To query vertex data on the Console page and then view the result on the Explore page, follow these steps:

  1. In the toolbar, click the Console tab.
  2. In the Current Graph Space field, choose a graph space name. In this example, mooc_actions is chosen.
  3. In the input box, enter an nGQL statement and click the button Icon of Run.

    NOTE: The queried result must contain the VIDs of the vertices.

    Here is an nGQL statement example.

    nebula> FETCH PROP ON * hash("Media History and Theory"); -- For the mooc_actions dataset, the VIDs of the course vertices are generated by Hash("<courseName>").
    

    The queried result gives the course with ID 8, as shown in this figure.

    The Result window shows the queried vertex data

  4. Click the Open in Explore button.

  5. In the dialog box, configure as follows:
    a. Click Vertex.
    b. In the Vertex ID field, choose a column name from the result table representing the VIDs of the vertices. In this example, VertexID is chosen.
    c. When the configuration is done, click the Import button.

    The dialog box for you to configure the vertex data

  6. (Optional) If some data exists on the board of Explore, choose a method to insert data:

    • Incremental Insertion: Click this button to add the queried result to the existing data on the board.
    • Insert After Clear: Click this button to clear the existing data from the board and then add the data.

When the data is inserted, you can view the visualized representation of the vertex data.

Next to do

On the Explore page, you can expand the board to explore and analyze graph data.


Last update: April 8, 2021