Too many mandatory fields for relationships in the import tool's doc
Closed this issue · 1 comments
szarnyasg commented
While working on neo4j-contrib/neo4j-apoc-procedures#489, I stumbled upon an inaccuracy in the import tool's documentation. In particular, it states that there are three mandatory fields for relationships, including :TYPE
:
For relationship data sources, there are three mandatory fields:
TYPE::
The relationship type to use for the relationship.
START_ID::
The id of the start node of the relationship to create.
END_ID::
The id of the end node of the relationship to create.
However, this is not the case: the :START_ID
and :END_ID
fields are indeed mandatory, but :TYPE
is not as it can be (and usually is) specified with the --relationships:RelType filename.csv
switch.
Here are two working examples that load relationships files that do not contain the :TYPE
field:
- The Train Benchmark's Neo4j driver uses the
neo4j-admin import
command: https://github.com/FTSRG/trainbenchmark/blob/1bc29cb878d59b67d59a3367c8a96c873b75ff4b/trainbenchmark-tool-neo4j/src/main/java/hu/bme/mit/trainbenchmark/benchmark/neo4j/driver/Neo4jDriver.java#L144-L161 - The LDBC Social Network Benchmark's load script uses the
neo4j-import
command: https://github.com/ldbc/ldbc_snb_implementations/blob/e7aff8b6403db4412ce849369d0b6be9dc9d7338/cypher/load-scripts/import-to-neo4j.sh
mariascharin commented
@szarnyasg Thank you for noticing and letting us know! I have fixed this at the source (which is in a different repository). The web version will be updated at the next docs deployment.
Maria