Graph O&M

Updated at:

This topic describes the Graph O&M feature of Graph Compute.

Graph O&M

On the Graph O&M page, you can view the backflow information for a graph in one of the following modes:

  • Graph schema mode: Lets you build indexes for and write data to your graph.

  • Vertex and edge mode: Lets you view the backflow logs for vertices and edges.

Graph schema mode

In graph schema mode, you can view the overall operational information of your graph. Right-click a vertex or an edge to perform the following operations:

  • Trigger index building: Select a partition to start the index building process.

  • Incremental data write: Writes data based on the data update syntax.

  • Data export

  • Scheduled export

Vertex and edge mode

In this mode, you can view the backflow logs for the current graph:

  • Backflow object: The table that corresponds to a vertex or an edge in the graph schema.

  • Status: The page displays the latest backflow information. Click Refresh to update the status. For a description of each status, see Current backflow.

  • Trigger Time and Completion Time

  • Click Details to view specific information about the backflow object.

Backflow details

Basic information

This section displays basic information about the data table, such as the table name, status, and data source table.

Current backflow

The Current backflow tab uses a progress bar to show the backflow steps: Pending backflow, Scan data source, Index building, Index switching, and Backflow succeeded. You can click Details for each step to view more information. The Trigger Information table at the bottom of the page shows detailed data, including the Backflow ID, Trigger Time, Data Source, Incremental Timestamp (not applicable for full tables), Partition, Record Count, and Partition Size. Click the Refresh button in the upper-right corner to update the backflow status.

  • The backflow process consists of the following seven stages:

    • Not triggered: The backflow process has not been started.

    • Triggered: The backend has received the trigger signal and successfully validated the request.

    • Waiting for index building: The system adds the table to the build queue. The build service selects tables from the queue based on their priority to build indexes.

    • Index building: The build service is building the index in HDFS.

    • Waiting for index switching: After the index is generated, the system adds the table to the switch queue. The switch program selects tables from the queue based on their priority.

    • Index switching: The service pulls the index from HDFS to the online service's physical machine, and completes the data switch.

    • Backflow succeeded: The data backflow is complete. The data is now available for query and update operations.

Historical backflow

The Historical backflow tab displays all historical backflow records in a table. The table includes information such as the Backflow ID, Trigger Time, Data Source, Incremental Timestamp (not applicable for full tables), Partition, Record Count, and Partition Size.

Field structure

This section displays the field structure of the vertices and edges that are configured in the graph model.

Data export

Overall process

Data export

  1. To export data from a vertex or edge, disable the "Index optimization" option on its data configuration page and submit the change.

  2. After you modify the table configuration, save and publish the graph configuration.

  3. Select the vertex or edge and trigger index building again. After the backflow is complete, the resulting index is exportable.

  4. Select the vertex or edge and go to the Data Export page. Specify the project, table, new partition version, and exportable version. Then, click "Get CREATE TABLE statement".

  • Important: Do not click the "Export" button yet.

  1. After you get the CREATE TABLE statement, run it in MaxCompute to create the table.

  2. After the table is created, use the ALTER TABLE statement to add the corresponding partition.

  • Important: The partition name must match the one specified in step 4.

  • Important: For each export, you must add a new partition to the corresponding table in MaxCompute to prevent duplicate data writes.

  1. After creating the table and partition in MaxCompute and granting the required permissions, return to the Data Export page in Graph Compute, verify that the information is correct, and click the "Export" button to create the task.

  2. You can view information about the export task on the Details page for the corresponding vertex or edge in the backflow logs.

Scheduled export

  1. To export data from a vertex or edge, disable the "Index optimization" option on its data configuration page and submit the change.

  2. After you modify the table configuration, save and publish the graph configuration.

  3. Select the vertex or edge and trigger index building again. After the backflow is complete, the resulting index is exportable.

  4. Select the vertex or edge and go to the Scheduled Export page. Specify the project and table, select the new partition version, and configure the schedule. Then, click "Get CREATE TABLE statement".

  • Important: Do not click the "Export" button yet.

  • Note: If you need to export data multiple times a day, select "yyyyMMddHH" for the new partition version.

  1. After you get the CREATE TABLE statement, run it in MaxCompute to create the table.

  2. After the table is created, use the GRANT command to grant the Graph Compute account permissions on the table.

  3. After creating the table and granting permissions in MaxCompute, return to the Scheduled Export page in Graph Compute, verify that the information is correct, and click the "Export" button to create the task.

  • Important: Creating a new task for the same vertex or edge deletes the previous one.

  1. You can view information about the export task on the Details page for the corresponding vertex or edge in the backflow logs.

Examples

Prepare an exportable index version

  1. To export data from a vertex or edge, disable the "Index optimization" option on its data configuration page and submit the change.

  1. After you modify the table configuration, save and publish the graph configuration.

  1. Select the vertex or edge and trigger index building again. After the backflow is complete, the resulting index is exportable.

In the Trigger Index Building dialog box, select the partition and incremental timestamp (the start time to retrieve incremental data after a data switchover), and then click Trigger.

Get the statement and create the table

  1. In Graph Compute, fill in the export parameters and click "Get CREATE TABLE statement". Do not click the "Export" button yet.

The Data Export page displays the progress of the current exportable version and the Index Optimization status, which must be disabled. You must specify parameters such as Export Type (MaxCompute), Project, Table, Exportable Version, and New Partition Version.

The View CREATE TABLE SQL Statement dialog box displays the CREATE TABLE statement, which is automatically generated from the current graph schema and includes the names, types, and partition definitions of all configured fields. You can click the copy icon to copy this SQL statement.

  1. Run the SQL statement in MaxCompute to create the table.

  2. For a "Data export" task, you must add the corresponding partition to the table.

alter table openrec_new.test_momet add partition (ds='2023032302');

Grant table-level permissions in MaxCompute

In MaxCompute, you must grant the Graph Compute ODPS account permissions on the table to be exported.