I just discovered yesterday, the use of WHERE
with LOAD
. This is really great as you can do controlled imports instead of blundering your way with the data.
WHERE
with LOAD
is shown in an example, but not discussed here:
//skip null values
LOAD CSV WITH HEADERS FROM 'file:///companies.csv' AS row
WITH row WHERE row.Id IS NOT NULL
MERGE (c:Company {companyId: row.Id});
In these URLs, LOAD
with WHERE
is not described at all, but would be useful:
- LOAD CSV - Cypher Manual
- How-To: Import CSV Data with Neo4j Desktop - Developer Guides
- Importing CSV files with Cypher - graphgists
- https://neo4j.com/graphacademy/training-intro-40/17-using-load-csv-import/
Finally, as a feature request, it would be useful to add an argument for conditions for importing into the APOC: