# Neo4j apoc.conf

**URL:** <https://community.neo4j.com/t/neo4j-apoc-conf/68252>\
**Category:** Procedures & APOC\
**Tags:** apoc, import, conf\
**Created:** [June 4, 2024, 3:34pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252 "2024-06-04T15:34:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yanivts1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/yanivts1/32/29440_2.png) [@yanivts1](https://community.neo4j.com/u/yanivts1)\
**Post date:** [June 4, 2024, 3:34pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/1 "2024-06-04T15:34:26Z")

</div>

Hi everyone,

I'm struggling a lot trying to LOAD csv file on a daily schedule...  
I've created a file with the script like in neo4j browser ( :auto load csv from ...)  
then I tried to execute cypher-shell and it doesn't work - "unknown command :auto".  
so, after reading, i tried "apoc.periodic.iterate('call apoc.load.csv("file....)) and also doesn't work - also tried in browser... it says:  
"Failed to invoke procedure 'apoc.periodic.iterate': Caused by: java.lang.RuntimeExcpetion: import from files not enabled, please set apoc.import.fileenabled=true in your apoc.conf."

I created a file "apoc.conf" and put it in the conf folder , near neo4j.conf  
in the conf file i wrote the line: "apoc.import.file.enabled=true", restart the service and doesn't help.  
I don't know what to do else.  
Any ideas ?  
Thanks

---

<div class="post-metadata">

**Author:** ![dana\_canzano](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dana_canzano/32/27392_2.png) [@dana\_canzano](https://community.neo4j.com/u/dana_canzano)\
**Post date:** [June 4, 2024, 4:24pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/2 "2024-06-04T16:24:31Z")

</div>

@yanivts1

What version of Neo4j? I'd like to see if i can reproduce etc

---

<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:** [June 4, 2024, 4:39pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/3 "2024-06-04T16:39:03Z")

</div>

Can you provide the cypher you are trying to execution using cypher-shell?

I just tried the following in cypher-shell and it worked.

 ![Screen Shot 2024-06-04 at 12.35.03 PM](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/4/3/43317105607beed626ff0e7214f7015f107572f1.png)

You would need ":auto" when executing in Neo4j Browser, but it does not look necessary when executing in cypher-shell.

---

<div class="post-metadata">

**Author:** ![yanivts1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/yanivts1/32/29440_2.png) [@yanivts1](https://community.neo4j.com/u/yanivts1)\
**Post date:** [June 4, 2024, 8:34pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/4 "2024-06-04T20:34:21Z")

</div>

It's working!  
Now i need to schedule it...  
Thanks

---

<div class="post-metadata">

**Author:** ![yanivts1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/yanivts1/32/29440_2.png) [@yanivts1](https://community.neo4j.com/u/yanivts1)\
**Post date:** [June 5, 2024, 12:38pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/5 "2024-06-05T12:38:06Z")

</div>

Hi,

When i try to load 2 million rows , the CPU goes up to 100% and everything crushes.  
Any ideas?  
From browser it didn't happen.

BTW, I'm using MERGE

CALL {  
LOAD CSV...  
MERGE (p:Person {idNumber: row.idNumber})  
ON CREATE SET  
p.update = datetime(),  
p.name = row.name  
....  
}  
IN TRANASCTIONS OF 500 ROWS

Thanks

---

<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:** [June 5, 2024, 12:59pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/6 "2024-06-05T12:59:12Z")

</div>

If you are now using merge, do you have an index on Person(idNumber)?

---

<div class="post-metadata">

**Author:** ![yanivts1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/yanivts1/32/29440_2.png) [@yanivts1](https://community.neo4j.com/u/yanivts1)\
**Post date:** [June 5, 2024, 1:31pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/7 "2024-06-05T13:31:31Z")

</div>

yes, i have index.  
Maybe the server resources is not enough?  
I have 16GB RAM  
Also, in the conf file i set the memory heap to 16GB and other memory things to high

---

<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:** [June 5, 2024, 2:02pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/8 "2024-06-05T14:02:24Z")

</div>

Also, 500 rows is probably too low. Investigate 10,000 and multiples of to see if performance is better

---

<div class="post-metadata">

**Author:** ![yanivts1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/yanivts1/32/29440_2.png) [@yanivts1](https://community.neo4j.com/u/yanivts1)\
**Post date:** [July 4, 2024, 7:29am UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/9 "2024-07-04T07:29:53Z")

</div>

Hi,

The cypher-shell worked for me and i made some progress...  
Now, i want to load the data and handle errors with problematic rows.  
I found some queries to do this, but again, have errors.  
I'm trying in browser, not cypher-shell  
so, i tried to simplify the query (without error handling) and came up with a shorter query ' just to check if it works, and it doesn't. still fail to invoke "apoc.periodic.iterate...", complaining on apoc.conf...  
I'm using Neo4j 5.16, and also apoc plugins: core and extended 5.16. Also tried in Neo4j 5.20.  
Here is the query:  
**CALL apoc.periodic.iterate(**  
\*\* "CALL apoc.load.csv('file:///TEST/Persons-Full.csv',\*\*  
\*\* {header:true}) YIELD map AS row",\*\*  
\*\* "MERGE (s:Person {idNumber: row.idNumber})",\*\*  
**{batchSize:10000, parallel:false} )**

The Error:  
**Failed to invoke procedure `apoc.periodic.iterate`: Caused by: java.lang.RuntimeException: Import from files not enabled, please set apoc.import.file.enabled=true in your apoc.conf**

I created a file: apoc.conf  
and put 1 line:  
**apoc.import.file.enabled=true**

What else can i try?

Thanks

---

<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:** [July 4, 2024, 2:21pm UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/10 "2024-07-04T14:21:56Z")

</div>

I just verified this works. Assuming you placed the file in the database's "conf" folder, did you restart the server after adding the file?

---

<div class="post-metadata">

**Author:** ![yanivts1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/yanivts1/32/29440_2.png) [@yanivts1](https://community.neo4j.com/u/yanivts1)\
**Post date:** [July 5, 2024, 9:14am UTC](https://community.neo4j.com/t/neo4j-apoc-conf/68252/11 "2024-07-05T09:14:22Z")

</div>

Thanks,

Sure i restarted the server after putting the file in the config folder.  
Anyway, it started working somehow.
