Assign Multiple Labels to Vertex or Edge Tables

When creating a SQL property graph, you can assign multiple labels to a vertex or an edge table in the Editor or Designer tab at the Define Graph step of the graph creation workflow.

See Create a Property Graph from Existing Relational Tables for instructions on getting started with the property graph wizard, to create a SQL property graph.

You can create, edit, delete, or assign multiple labels in the Designer tab as shown in the following figure:



Similarly, the following figure shows the Editor tab panel where you can view the Actions menu to create and manage multiple labels for a vertex or an edge table.



The following steps describe the different label actions supported both in the Designer and Editor tabs:

  • Create a new label.
    1. Access the Create New Label option depending on your tab choice.
      • Designer:

        Click the Create Label (+) icon in the Labels section for a vertex or an edge table.

      • Editor:
        1. Select a vertex or an edge table in the top panel to create new labels.

          The source table details such as the source table key, default label, and label properties get displayed in the bottom panel. Note that the Select Label drop-down remains disabled when only a single label is assigned to the source vertex or edge table.

        2. Click Create Label from the Actions drop-down menu.

      The Create New Label slider opens as shown:



    2. Enter the Label Name and optionally, select the required label Properties.
    3. Click Save to create the new label.
      The Select Label drop-down for the specific source table gets enabled and the newly created label appears in the list.
    Repeat this step to add as many labels as required for the source tables.
  • Edit an existing label.
    1. Access the Edit Label option depending on your tab choice.
      • Designer:

        Click Edit Label from the Actions drop-down menu for the label you wish to edit (see the preceding figure).

      • Editor:
        1. Select a vertex or an edge table in the top panel to edit one of its labels.
        2. Click the Select Label drop-down and select the label that you wish to edit.

          If only a single label is assigned to a source table, then the Select Label drop-down remains disabled. In that case, you can edit the default single label using the edit icon against the table in the Designer tab. Refer to Vertices and Edges in Build a Graph Manually.

        3. Click Edit Label from the Actions drop-down menu.

      The Edit Label slider opens.

    2. Edit either the Label Name, Properties, or both.
    3. Click Save.
  • Delete an existing label.
    1. Access the Delete Label option depending on your tab choice.
      • Designer:
        1. Click Delete Label from the Actions drop-down menu for the label you wish to remove (see the preceding figure).
      • Editor:
        1. Select a vertex or an edge table in the top panel to delete one of its labels.
        2. Click the Select Label drop-down and select the label that you wish to remove.
        3. Click Delete Label from the Actions drop-down menu.

      Note that the Delete Label option is enabled only when there are multiple labels assigned to a table.

      The Delete Label confirmation box opens.

    2. Click Delete.
  • Manage the label assignments.
    1. Access the Label Assignment option depending on your tab choice.
      • Designer:

        Click the Assign Label (assign_label_icon) icon in the Labels section for a vertex or an edge table.

      • Editor:
        1. Select a vertex or an edge table in the top panel to assign one or more labels.
        2. Click Label Assignment from the Actions drop-down menu.

      The Label Assignment slider opens as shown:


      Description of label_assignment.png follows
      Description of the illustration label_assignment.png

    2. Select to assign as many labels as you wish for the source table.
      Ensure that you assign at least one label to a table and the assigned label properties match at least one table column.
    3. Click Save.

All the preceding label actions performed in the Designer or Editor tabs will automatically be reflected in the Designer, Editor, and Source tabs.