|
| 1 | +--- |
| 2 | +title: Visual Modeling |
| 3 | +--- |
| 4 | + |
| 5 | +After creating the draft instance, we need to click on "Modeling" to enter the visual graph modeling page. |
| 6 | +Here, we have two ways to build the model: |
| 7 | + |
| 8 | +## Create Graph Model |
| 9 | + |
| 10 | +### Options 1: Manual Creation |
| 11 | + |
| 12 | +#### Create Vertex and Vertex Properties |
| 13 | + |
| 14 | +We need to click the fourth button, "Create new vertex," in the sidebar to create a node on the canvas. The initial name of the node will be "Vertex_1. |
| 15 | + |
| 16 | +After clicking on the node, we can manually modify its label in the right-hand panel, or simply double-click the node to edit it directly on the canvas. |
| 17 | +<img src="/visualization/modeling/add_vertex_edit.png" /> |
| 18 | + |
| 19 | +Next, following the prompts, we need to complete the property information for this node. Click the "Plus" button under Properties to add attributes, and fill them out one by one. |
| 20 | +<img src="/visualization/modeling/add_property.png" /> |
| 21 | + |
| 22 | +If we want to delete a node’s property, check the properties you wish to remove in the Checkbox area and click the delete button. |
| 23 | +<img src="/visualization/modeling/delete_property.png" /> |
| 24 | + |
| 25 | +#### Create Edges |
| 26 | + |
| 27 | +Now let's create edges. To create an edge, hover over the edge of the starting node, then click and drag. |
| 28 | +<img src="/visualization/modeling/drag_start.png" /> |
| 29 | + |
| 30 | +If the endpoint is an empty area of the canvas, a new node will automatically be created. |
| 31 | +<img src="/visualization/modeling/drag_end.png" /> |
| 32 | + |
| 33 | +If the endpoint is another existing node, an edge will be established between the two nodes. |
| 34 | +<img src="/visualization/modeling/drag_other_edge_end.png" /> |
| 35 | + |
| 36 | +### Option 2: Parsing CSV Files for Creation |
| 37 | + |
| 38 | +Manually creating a graph model is particularly helpful when designing complex business models. However, when we already have some graph data, automatically deriving the graph model based on the existing data becomes a more convenient approach. |
| 39 | + |
| 40 | +Note: There are two constraints for the CSV files here: |
| 41 | + |
| 42 | +- Each CSV file, by default, represents one type of label. The file name should ideally be the label name, such as person.csv. |
| 43 | +- The CSV file must include a header row. |
| 44 | + |
| 45 | +When the above two requirements are met, we can utilize the "Automatic Parsing and Modeling" feature provided by GraphScope Portal, which is located in the second option of the right-hand sidebar. |
| 46 | +<img src="/visualization/modeling/auto_parse_1.png" /> |
| 47 | + |
| 48 | +After uploading the data, we only need to verify each CSV file to ensure that the automatically inferred node and edge types are accurate. |
| 49 | + |
| 50 | +<img src="/visualization/modeling/auto_parse_2.png" /> |
| 51 | + |
| 52 | +Once confirmed, we can click "Generate Graph Model" , and the system will automatically derive the graph model. |
| 53 | + |
| 54 | +<img src="/visualization/modeling/auto_parse_3.png" /> |
| 55 | + |
| 56 | +## Save Model |
| 57 | + |
| 58 | +Once the model is created and passes the system's validation, we can save the model. Here,there are two key points that <strong> require special attention:</strong> |
| 59 | + |
| 60 | +> - Each `vertex label` must have a `primary key` in its properties, and each `edge label` can only have one property field. |
| 61 | +> - <span style='color:red'>The `GraphScope Interactive` engine does not support modifications to the graph model. If you need to modify the graph model, you must create a new graph instance.</span> |
| 62 | +
|
| 63 | +<img src="/visualization/modeling/save_model.png" /> |
| 64 | + |
| 65 | +Now, let's goto importing page |
0 commit comments