# Loading csv files

**URL:** <https://community.neo4j.com/t/loading-csv-files/65438>\
**Category:** Neo4j Graph Platform\
**Tags:** cypher, import\
**Created:** [December 20, 2023, 10:05am UTC](https://community.neo4j.com/t/loading-csv-files/65438 "2023-12-20T10:05:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jreige.finianos1](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jreige.finianos1](https://community.neo4j.com/u/jreige.finianos1)\
**Post date:** [December 20, 2023, 10:05am UTC](https://community.neo4j.com/t/loading-csv-files/65438/1 "2023-12-20T10:05:46Z")

</div>

Hello,  
I have 2 files one with nodes and features and the other have the edges (ID1 and ID2). I can load the nodes and create them but the edges doesn't work it loads for a long time and no changes are made.  
Please if anyone can help me with this.

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [December 20, 2023, 10:14am UTC](https://community.neo4j.com/t/loading-csv-files/65438/2 "2023-12-20T10:14:34Z")

</div>

Can you provide the cypher you tried and a sample of you data file?

---

<div class="post-metadata">

**Author:** ![jreige.finianos1](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jreige.finianos1](https://community.neo4j.com/u/jreige.finianos1)\
**Post date:** [December 20, 2023, 10:25am UTC](https://community.neo4j.com/t/loading-csv-files/65438/3 "2023-12-20T10:25:01Z")

</div>

LOAD CSV WITH HEADERS FROM 'file:///nodes.csv' AS line  
CREATE (:User {  
id: toInteger(line.ID),  
followers: toInteger(line.followers),  
following: toInteger(line.following),  
location: line.location,  
profileImageUrl: line.profile\_image\_url,  
screenName: line.screen\_name,  
statuses: line.statuses,  
url: line.url  
});

LOAD CSV WITH HEADERS FROM 'file:///relations.csv' AS line  
MATCH (u1:User {id: toInteger(line.START\_ID)})  
MATCH (u2:User {id: toInteger(line.END\_ID)})  
MERGE (u1)-[:FOLLOWS\_IN]-\>(u2)

nodes csv have 38986 rows and the relations have 44630

---

<div class="post-metadata">

**Author:** ![jreige.finianos1](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jreige.finianos1](https://community.neo4j.com/u/jreige.finianos1)\
**Post date:** [December 20, 2023, 10:29am UTC](https://community.neo4j.com/t/loading-csv-files/65438/4 "2023-12-20T10:29:22Z")

</div>

![Screenshot 2023-12-20 122822](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/d/a/da3bf015a84c00f7160336d4a42050f46a4aa159.png)

---

<div class="post-metadata">

**Author:** ![jreige.finianos1](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jreige.finianos1](https://community.neo4j.com/u/jreige.finianos1)\
**Post date:** [December 20, 2023, 10:29am UTC](https://community.neo4j.com/t/loading-csv-files/65438/5 "2023-12-20T10:29:54Z")

</div>

![Screenshot 2023-12-20 122849](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/8/d/8d066351470805280750e64235d21253c927fd89.png)

---

<div class="post-metadata">

**Author:** ![jreige.finianos1](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jreige.finianos1](https://community.neo4j.com/u/jreige.finianos1)\
**Post date:** [December 20, 2023, 10:46am UTC](https://community.neo4j.com/t/loading-csv-files/65438/6 "2023-12-20T10:46:13Z")

</div>

![profile](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/1/c/1c4d22d0680fe7fb02a741366b2fff589ab1ec92.png)  
this is a debug if it might help

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [December 20, 2023, 12:35pm UTC](https://community.neo4j.com/t/loading-csv-files/65438/7 "2023-12-20T12:35:52Z")

</div>

Your ‘id’, ‘start\_id’, and ‘end\_id’ column names begin with a colon. This doesn’t match what you are using in your cypher. I suggest you edit the two files to remove the colons and try again.

---

<div class="post-metadata">

**Author:** ![jreige.finianos1](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jreige.finianos1](https://community.neo4j.com/u/jreige.finianos1)\
**Post date:** [December 20, 2023, 2:03pm UTC](https://community.neo4j.com/t/loading-csv-files/65438/8 "2023-12-20T14:03:28Z")

</div>

Thx it worked after 30 min of loading
