Skip to content

Prepare CSV files

With Studio, you can batch import vertex and edge data into Nebula Graph. Currently, only CSV files without headers and comma-separated data are supported. Each file represents vertex or edge data of one type.

To create applicable CSV files, process the source data as follows:

  1. Generate CSV files for vertex and edge data:

    • user.csv: Contains the vertices representing users with no property. The userId column can be used as the vertex IDs.
    • course.csv: Contains the vertices representing courses with the courseId properties. The courseName column can be used as the vertex IDs.
    • actions.csv contains:

      • The edges representing actions with the actionId, label, duration, feature0, feature1, feature2, and feature3 properties. For the label column, 1 is replaced with TRUE and 0 is replaced with FALSE.
      • The userId column representing the source vertices of the edges.
      • The courseName column representing the destination vertices of the edges.

      This figure shows an example of a CSV file with the header.

      The actions.csv file contains the actionId, userId, courseName, duration, feature0, feature1, feature2, feature3, and label columns

  2. Delete all the headers from the CSV files.


Last update: December 30, 2020