Updated on 2024-01-03 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

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 2 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.
  • 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.

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 3 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 4 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 5 Results display

    During the deletion, the filtering function on the Filtering tab is unavailable.