Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-26-2021 08:57 AM
Hello developers, I think, i need help.
I try to import ~400K json data into graph database by using APOC. But I got an error. I believe I just make a small mistake on my cipher query.
Error screen shot:
Take a look my cipher query:
with "file:///huulietgeed.json" as url
call apoc.load.json(url) yield values unwind values as value
merge (c:Company {register: value.info.register_number})
on create set c.name = value.info.company_name,
c.form = value.info.company_form,
c.register_date = value.info.register_date,
c.type = value.info.company_type,
c.number_of_owners = value.info.number_of_owner,
c.location = value.info.company_location
foreach (holder in value.stakeHolders |
merge (p:Person {person_id : holder.firstname + "." + holder.lastname})
on create set p.firstname = holder.lastname,
p.lastname = holder.firstname,
p.country = holder.country
create (holder1:RegisterDate {date: holder.date})
merge (p)-[:has]->(holder1)-[:holder_of]->(c)
)
foreach (manager in value.ceo |
merge (m:Person {person_id: manager.lastname + "." + manager.firstname})
on create set m.firstname = manager.firstname,
m.lastname = manager.lastname,
m.country = manager.country
create (manager1:RegisterDate {
position: manager.position,
date: manager.date
})
merge (m)-[:has]->(manager1)-[:has_position]->(c)
)
foreach (area in value.area |
merge (a:ActivityArea {code: area.code})
on create set a.title = area.title
create (area1:RegisterDate {
date: area.date
})
merge (c)-[:has]->(area1)-[:operation]->(a))
please help me!
06-26-2021 02:50 PM
Hi
Please find cypher ref card url for your referal
Thanks
Sameer S G
06-26-2021 06:26 PM
@sam_gijare
Dear Sam,
I suppose I found it out. But I got another exception.
Exception in thread "neo4j.Scheduler-1" Exception in thread "neo4j.FileIOHelper-11" Exception in thread "neo4j.TransactionTimeoutMonitor-8" Exception in thread "neo4j.TransactionTimeoutMonitor-12" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
2021-06-26 19:28:11.082+0000 ERROR Client triggered an unexpected error [Neo.DatabaseError.Statement.ExecutionFailed]: Java heap space: failed reallocation of scalar replaced objects, reference ddc09c7d-3016-4597-acf0-96d600dfc827.
Should I increase my database heap size? or do something else?
06-27-2021 09:21 AM
Dear Sir
Please configure heap memory in neo4j.conf (-xmx )and you need to tune it so that process is not running out of memory
Thanking you
Yours
Sameer Gijare
All the sessions of the conference are now available online