Hi All,
I am evaluating using memGraph for our new project, mainly having to store graph/hierarchial data. The data set by itself is small to medium sized. I 've checked out the basic cypher commands which worked fine. Now I am trying to import some data into the DB using LOAD CSV cypher command where in I am hitting the issue.
Env details: Docker on Mac
docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 -v mg_lib:/var/lib/memgraph memgraph/memgraph-platform
Steps to reproduce:
- Run memgraph using docker command:
docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 -v mg_lib:/var/lib/memgraph memgraph/memgraph-platform
- Try LOADING CSV data into DB using the following commands:
1. LOAD CSV FROM "/deptt-deDup.csv" WITH HEADER AS row
-> CREATE (d:Department)
-> SET d.code = row.code, d.name = row.name, d.id = row.id;
Empty set (round trip in 0.001 sec)
INFO: It's important to note that the parser parses the values as strings. It's up to the user to convert the parsed row values to the appropriate type. This can be done using the built-in conversion functions such as ToInteger, ToFloat, ToBoolean etc.
77 labels have been created.
77 nodes have been created.
231 properties have been updated.
2. LOAD CSV FROM "/deptt-deDup.csv" WITH HEADER AS row
-> CREATE (d:Department{ code: row.code, name: row.name });
3. LOAD CSV "/commodity-Dedup.csv" WITH HEADER AS row
-> MERGE (c:Commodity{code: row.code, name: row.name});
4. memgraph> LOAD CSV FROM "/deptt-deDup.csv" WITH HEADER AS row
-> MERGE (d:Department{code: row.code})
-> SET d.code = row.code, d.name = row.name;
Empty set (round trip in 0.266 sec)
INFO: It's important to note that the parser parses the values as strings. It's up to the user to convert the parsed row values to the appropriate type. This can be done using the built-in conversion functions such as ToInteger, ToFloat, ToBoolean etc.
77 labels have been created.
77 nodes have been created.
154 properties have been updated.
For some reason I am not able to upload the CSV file so am pasting a small snippet of the file below:
code,name,id
0,GROC-ALL OTHER ,0
1,PET ,1
2,SOFT DRINKS ,2
3,BABY ,3
4,SPIRITS ,4
- Query for the nodes using Cypher commands:
MATCH(d:Department)
return d
- Note that the node has only the name property. It does not have the id or the code properties
Appreciate any inputs.
Thanks
Bug Report
Description
(A clear and concise description of what the bug is.)
Steps to reproduce
(Write your steps here:)
- Step 1…
- Step 2…
- Step 3…
Expected behavior
(Write what you thought would happen.)
Actual behavior
(Write what happened. Add full console log messages and screenshots, if applicable.)
Your environment
- Memgraph version used
- Operating system and version (e.g., Ubuntu 20.04.2 LTS)