|
1 | 1 | --- |
2 | | -title: Visual Modeling |
| 2 | +title: Visual Importing |
3 | 3 | --- |
4 | 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: |
| 5 | +## Upload source data |
7 | 6 |
|
8 | | -## Create Graph Model |
| 7 | +Once the graph model is created, we can begin importing data.there are three ways to import data: |
9 | 8 |
|
10 | | -### Options 1: Manual Creation |
| 9 | +### Option 1: Manual Import |
11 | 10 |
|
12 | | -#### Create Vertex and Vertex Properties |
| 11 | +Each label contains a location field. Click the "upload" button to upload the corresponding CSV file to the interactive service. |
13 | 12 |
|
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. |
| 13 | +<img src="/visualization/importing/upload_start.png" /> |
15 | 14 |
|
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" /> |
| 15 | +Upon success, a location path will be returned, indicating the data has been imported. |
18 | 16 |
|
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" /> |
| 17 | +<img src="/visualization/importing/upload_end.png" /> |
21 | 18 |
|
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" /> |
| 19 | +### Option 2: Automatic Import After CSV Parsing |
24 | 20 |
|
25 | | -#### Create Edges |
| 21 | +This Option extends the convenience of automatic CSV modeling. During CSV parsing, the system caches the source file locally in the browser. As a result, the data can be automatically uploaded on the data loading page. |
26 | 22 |
|
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" /> |
| 23 | +### Option 3: Import via Configuration File |
29 | 24 |
|
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" /> |
| 25 | +<img src="/visualization/importing/via_config.png" /> |
32 | 26 |
|
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" /> |
| 27 | +## Bind Data Source |
35 | 28 |
|
36 | | -### Option 2: Parsing CSV Files for Creation |
| 29 | +After uploading the data, click the "data source binding" button to bind the data path to the model label. If successful, a configuration panel will appear. |
| 30 | +<img src="/visualization/importing/load_data.png" /> |
37 | 31 |
|
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. |
| 32 | +Click "import" to proceed to the job page. |
39 | 33 |
|
40 | | -Note: There are two constraints for the CSV files here: |
| 34 | +## Verify Results |
41 | 35 |
|
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. |
| 36 | +At this point, validate the data on the query page. We will cover this in detail in the next chapter. Let’s move on to the next chapter! |
44 | 37 |
|
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 |
| 38 | +<img src="/visualization/importing/test_query.png" /> |
0 commit comments