Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-11-2019 07:09 PM
Hello,
I am newbie with neo4j. I can load csv with cypher-shell.bat in powershell or load csv with neo4j web UI successful. I want to load csv that can be run with windows scheduler. Can I run load csv with .bat and windows scheduler or does someone have suggestions? Thank you.
I load csv with powershell like below:
\bin> .\cypher-shell.bat -a bolt://localhost:7687 -u neo4j -p password
neo4j>:begin
neo4j#
LOAD CAV WITH HEADERS FROM 'file://test.csv' as line
MERGE (n:n{n:line.n})
MERGE (m:m{m:line.m})
MERGE (n) -[r:TO{r:line.r}]->(m)
;
Solved! Go to Solution.
09-11-2019 07:59 PM
Create the file(s) with your cypher. I used PowerShell to show this. The |
before the .\bin\cypher... is the pipe character
PS C:\neo4j-enterprise-3.5.9> notepad my.cql
PS C:\neo4j-enterprise-3.5.9> cat my.cql
match (n) return count(n);
PS C:\neo4j-enterprise-3.5.9> cat my.cql | .\bin\cypher-shell.bat -u neo4j -p secret
count(n)
171
09-11-2019 07:59 PM
Create the file(s) with your cypher. I used PowerShell to show this. The |
before the .\bin\cypher... is the pipe character
PS C:\neo4j-enterprise-3.5.9> notepad my.cql
PS C:\neo4j-enterprise-3.5.9> cat my.cql
match (n) return count(n);
PS C:\neo4j-enterprise-3.5.9> cat my.cql | .\bin\cypher-shell.bat -u neo4j -p secret
count(n)
171
09-12-2019 01:20 AM
Thanks for reply, I will try it.
All the sessions of the conference are now available online