Generate graph CSVs
Description
The Generate graph CSVs transform (previously Neo4j generate CSVs) writes CSV files with the nodes and relationships of the graphs in a field of the Graph data type: a file per combination of labels and a file per relationship type, in the import/ folder below the base folder.
The headers of the files are for one of these tools:
-
neo4j-admin import: the headers of Neo4j’s bulk import tool, which the Neo4j import transform runs.
-
plain column names: just the names, for loading the files into other graph databases, for example with
LOAD CSVon Memgraph or with the CSV load functions of Apache AGE.
Options
| Option | Default | Description |
|---|---|---|
Transform name |
Generate graph CSVs |
|
Graph field |
- |
The field in this pipeline that contains the graph data (Graph data type) |
Base folder (below |
|
the folder to write the nodes and relationships types to. Its |
CSV files prefix |
prefix |
prefix to apply to the generated CSV files |
Node/Relationships Uniqueness strategy |
None |
* None: don’t handle uniqueness while generating CSVs * First: if duplicates are found, keep the first occurrence * Last: if duplicates are found, keep the last occurrence Please note that primary key of all nodes written to a CSV file needs to be unique. The uniqueness strategy used in this transform is simple in nature and loads everything in memory. Because of this you can consider using a Sort transform to force uniqueness beforehand. |
CSV header format |
neo4j-admin import |
* neo4j-admin import: A The rows are the same with both. |
Filename field |
filename |
field that contains the filename for the CSV files to be generated |
File type field |
fileType |
field that contains the file type for the CSV files to be generated |