How to use CALL { ... } IN TRANSACTIONS with LOAD CSV?

Hi,

I am using Neo4j5.3 on my desktop. I have a large CSV for which I wrote the LOAD CSV command and was able to ingest from a smaller file (made from top 50 rows). I tried to use
:AUTO PERIODIC COMMIT 500
LOAD CSV ... and realized that PERIODIC COMMIT is deprecated and got the following error: The PERIODIC COMMIT query hint is no longer supported. Please use CALL { ... } IN TRANSACTIONS instead. (line 1, column 8 (offset: 7))
" USING PERIODIC COMMIT 500"
^

Are there examples of how CALL { ... } IN TRANSACTIONS can be used with LOAD CSV? Thanks!

I tried the following :

LOAD CSV FROM 'file:///eyp_customer_transactions_joined_allbrands.csv' AS row
CALL {
WITH row
...
} IN TRANSACTIONS OF 500 rows

and got the following error:
A query with 'CALL { ... } IN TRANSACTIONS' can only be executed in an implicit transaction, but tried to execute in an explicit transaction.

How do I troubleshoot this? Thanks,
Lavanya

You need to insert “:auto” at the beginning of the query.

2 Likes

But now: Could not find command :auto

@chris.morris

:auto is only required if using Neo4j Browser.