Document using WHERE in conjunction with LOAD

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
MERGE (c:Company {companyId: row.Id});

In these URLs, LOAD with WHERE is not described at all, but would be useful:

Finally, as a feature request, it would be useful to add an argument for conditions for importing into the APOC:

What do you mean concretely with the apoc.load.csv argument?

Conditions can become arbitrarily complex, so it's much better to leave that kind of filtering to cypher.

the WHERE also doesn't belong to LOAD CSV but to WITH.

Which should be explained in the intro training. See here the cypher manual.

1 Like