cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Issue with data and deleting imported data

Hi,

I am trying to import some data which has dates. However I realized the date fields were not imported in the nodes. I had marked them as integer while importing. Do I have to format dates in specific format in CSV before importing? And integer data type right data type for importing date and date time data?

Secondly since the data is not imported correctly, I am trying to delete, so I can reimport, but when I try 

MATCH (n:titles) detach delete n
the system throws the following error.  Kindly help, thanks in advance.
 
The allocation of an extra 2.0 MiB would use more than the limit 250.0 MiB. Currently using 249.7 MiB. dbms.memory.transaction.global_max_size threshold reached
2 REPLIES 2

glilienfield
Ninja
Ninja

Try batching the deletion

:auto MATCH (n:titles)
CALL {
WITH n
DETACH DELETE n
} IN TRANSACTIONS OF 1000 ROWS

https://neo4j.com/docs/cypher-manual/current/clauses/call-subquery/#subquery-call-in-transactions

if you want to store the dates as date type and not a string, you can use the date function. It has supported formats. See link below. I usually use yyyy-mm-dd format. 

https://neo4j.com/docs/cypher-manual/current/syntax/temporal/#cypher-temporal-specify-date

To reset your data in Aura, have a look at this support article.  

In CSV imports, generally the data comes in as a text string by default when read from CSV.  In general, you'll usually want to convert it to an integer or a date with any of the built-ins including APOC when doing the improt, since if you just set a property value equal to what was found in the file, you'll get a string property

https://aura.support.neo4j.com/hc/en-us/articles/4412131924883-How-to-wipe-out-delete-all-the-conten...

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online