iGraph Writer configuration

Updated at:

1. Introduction

Graph Compute is a high-performance, distributed graph computing service developed by Alibaba Cloud. It offers a one-stop graph technology service for trillion-record datasets. The iGraphWriter plugin performs batch incremental updates to iGraph.

2. How it works

In iGraph, all data operations, such as additions, deletions, and modifications, are considered incremental updates. The iGraphWriter plugin uses the iGraph Java SDK and an asynchronous update model to apply incremental updates, ensuring eventual consistency.

3. Features

3.1 Configuration example

This example shows how to write data in batches from MaxCompute to iGraph.

{
    "job":{
        "setting":{
            "speed":{
                "channel":2
            },
            "errorLimit":{
                "percentage":0.1
            }
        },
        "content":[
            {
                "reader":{
                    "name":"odpsreader",
                    "parameter":{
                        "accessKey":"***",
                        "accessId":"***",
                        "column":[
                            "id",
                            "name"
                        ],
                        "isCompress":"false",
                        "odpsServer":"***",
                        "tunnelServer":"***",
                        "partition":[
                            "ds=***"
                        ],
                        "project":"***",
                        "table":"***"
                    }
                },
                "writer":{
                    "name":"igraphwriter",
                    "parameter":{
                        "endpoint":"***",
                        "username":"***",
                        "password":"***",
                        "pkField":"id",
                        "graphName":"***",
                        "labelName":"***",
                        "column":[
                            "id",
                            "name"
                        ]
                    }
                }
            }
        ]
    }
}

3.2 Parameters

endpoint

  • Description: The endpoint for data updates. You can find this value on the instance details page under Instance Information > API Information > Access Domain Name.

  • Required: Yes

  • Default value: None

username

  • Description: The username specified during instance creation. You can find this value on the instance details page under Instance Information > API Information > Username.

  • Required: Yes

  • Default value: None

password

  • Description: The password specified during instance creation. You can find this value on the instance details page under Instance Information > API Information > Password.

  • Required: Yes

  • Default value: None

pkField

  • Description: The field to use as the primary key (pkey).

  • Required: Yes

  • Default value: None

graphName

  • Description: The name of the graph. You can find this in the Graph Name column on the Graph List page.

  • Required: Yes

  • Default value: None

labelName

  • Description: The name of the point or edge label.

  • Required: Yes

  • Default value: None

column

  • Description: The list of fields to import. Explicitly list all fields. Using a wildcard, such as "column": ["*"], may cause field mapping errors.

  • Required: Yes

  • Default value: None

skField

  • Description: The field to use as the secondary key (skey). This parameter is required only for edge tables.

  • Required: No

  • Default value: None

cmd

  • Description: The data operation to perform. Valid values: ADD (update) and DELETE.

  • Required: No

  • Default value: ADD

timeoutMs

  • Description: The timeout period for data updates, in milliseconds.

  • Required: No

  • Default value: 100

requestRetry

  • Description: The maximum number of retries for a failed data update.

  • Required: No

  • Default value: 3

On the iGraph instance details page, you can find the Username (for the username parameter), Access Domain Name (for the endpoint parameter), and Password (for the password parameter) in the API Information section. In the Current Data section, you can find the Deployed Graph Name (for the graphName parameter).

On the iGraph graph editing page, the labelName parameter refers to the name of a point or edge label. For example, point labels can be named person or software, and edge labels can be named knows (connecting two person points) or created (connecting a person point to a software point).

On the iGraph graph editing page, in the Data Configuration (Point) panel, the API parameters map to the UI fields as follows: labelName corresponds to Point Name (for example, software), pkField corresponds to the checkbox in the pkey column of the field structure, and column corresponds to the individual field rows in the field structure. For Data Source, you can select API Update, MaxCompute Data Source, or MaxCompute Data Source + API Update. For Index Type, you can select KV, KKV, or Inverted INDEX. The default value for Data TTL is 604800.

On the iGraph graph editing page, open the Data Configuration (Edge) panel. Set the edge name to created and select One-way Edge for the edge property. The associated nodes are person (source node) → software (destination node). Select API Update as the Data Source. In the field structure, pkField corresponds to the checkbox in the Source Field column, and skField corresponds to the checkbox in the Destination Field column. The column parameter corresponds to the list of field names (such as field0, field1, and field2), all of which have the type STRING. Set Data TTL to 604800 and enable the Index Optimization toggle.

3.3 Type conversion

You do not need to specify data types when using the iGraphWriter plugin. iGraph automatically converts data types during an incremental update.

Data integration type

iGraph data type

Long

INT64

Double

DOUBLE

String

STRING

Date

STRING

Boolean

STRING

Bytes

STRING

4. Performance report

4.1 Machine specifications

  1. CPU: 32-core Intel Xeon(Cascade Lake) Platinum 8269CY

  2. Memory: 64 GB

  3. Network: 200 Mbit/s

4.2 Test report

Number of channels

Data integration speed (records/s)

Data integration throughput (MB/s)

1

1,222

0.09

2

2,292

0.19

4

4,400

0.37

8

8,360

0.70

16

12,862

1.08

32

17,649

1.49

5. Limitations

For important information about data updates, see the official iGraph documentation: Usage notes.