Updated on 2024-03-28 GMT+08:00

Editing Schema

Adding a Label

In the metadata list on the left of the graph editor, click to add a label.
  • Label Name: name of the label to be added.
  • Type: You can select a label type (vertex, edge, or general-purpose). General-purpose indicates that a label can represent either a vertex or an edge.
  • Custom vertex style: You can define the color and mark of a label to distinguish vertices.
  • Add properties. By default, only the first added property is displayed on the canvas. You can manually adjust the property to be displayed. The canvas will respond in real time.
    Figure 1 Adding a label

Counting Vertices and Edges

On the Schema tab of the GES editor, click Refresh Vertex and Edge Count. The system counts the total number of vertices and edges in the current graph. You can also view the last count time.

Figure 2 Counting vertices and edges

Modifying a Label

This function is only available on graph version 2.3.18 or later.

In the metadata file list, click the metadata file for which you want to modify the label. The metadata label details page is displayed.

  • You can modify the label's property name, cardinality, and data type.
  • To hide or delete a property, click the hide or remove button in the Operation column.
  • If you accidentally deleted or incorrectly modified a property, simply click the reset button to revert back to the last saved data.

Confirm the modification and click Save.

Figure 3 Modifying a label

Hiding a Label

  • Hide all vertices and edges of a label.

    In the metadata list on the left of the graph editor, click the eye button next to metadata to hide all vertices and edges of the metadata in the analysis result.

    Figure 4 Hiding a label
  • Hide the vertices and edges of a selected label
    On the canvas, click any vertex in the graph. The selected vertex is displayed as .
    • is a label-based hide button. You can click this button next to a label to hide the vertices and edges of the selected label. That is, these vertices and edges are not displayed or dimmed on the canvas.
    • is a label-based display button. You can click the button to display the vertices and properties of the label.

Importing and Exporting Labels

You can import the metadata, edge data, and vertex data of a graph to or export them from an OBS bucket.

  • Import: Click Import in the metadata list. In the dialog box that is displayed, set Metadata, Edge Data, Vertex Data, Log Storage Path, Edge Processing, and Import Type, and click OK to import the data from the OBS bucket to a graph.
    • Log Storage Path: Stores vertex and edge data sets that do not comply with the metadata definition, as well as detailed logs generated during graph import.
    • Edge Processing: Includes Allow repetitive edges, Ignore subsequent repetitive edges, Overwrite previous repetitive edges, and Ignore labels on repetitive edges. Repetitive edges have the same source vertex and target vertex. When labels are considered, repetitive edges must have the same source and target vertices and the same labels.
    Figure 5 Importing metadata
  • Export: Click Export in the metadata list. In the dialog box that is displayed, set Metadata Name, Vertex Data Set, Edge Data Set, and Export Path, and click OK to export the data to the OBS bucket.
    Figure 6 Exporting metadata

Deleting a Label

  1. After this API is called, all data associated with the label will be deleted. Exercise caution when performing this operation.
  2. If the graph version is earlier than 2.2.18, schema labels cannot be deleted.
  3. Schema labels cannot be deleted from graphs of the database edition.
  4. The default label _DEFAULT_ cannot be deleted.

To delete a label, do the following:

  1. To delete a label, click the deletion icon next to the schema on the Schema tab on the left of the graph engine editor.
    Figure 7 Deleting a label
  2. In the dialog box that is displayed, read the message carefully, confirm the name of the label to be deleted, enter DELETE in the text box, and click OK.
    Figure 8 Confirming the deletion
  3. During the deletion, the result of deleting the label algorithm is displayed in the result display pane below the canvas.
    Figure 9 Results display

    During the deletion, the Filter button on the Filtering tab is grayed out and becomes unavailable.