RUN IN TRANSACTION error

Running neo4j Community server 4.4.5 on Ubuntu 20.04

I have the following query:

LOAD CSV WITH HEADERS FROM 'file:///asset_statuses.csv' AS row FIELDTERMINATOR ';'

call {
	WITH row

	CREATE (asset_statuses:AssetStatus)
			SET asset_statuses=row,
				asset_statuses.uuid=apoc.create.uuid()

			WITH asset_statuses,row

			MATCH (asset:Asset { id: row.asset_id})
			MERGE (asset)-[:HAS_STATUS]->(asset_statuses)

	} IN TRANSACTIONS OF 1000 ROWS

	RETURN row

I avoided PERIODIC COMMIT because it is discouraged and will be discontinued, but the query ì, which is (seems to be) exactly equal to the example, returns the following error:

Neo.DatabaseError.Statement.ExecutionFailed: A query with 'CALL { ... } IN TRANSACTIONS' can only be executed in an implicit transaction, but tried to execute in an explicit transaction.

Any suggestion?

@paolodipietro58

are you running the query via the Neo4j Browser or bin/cypher-shell ? or some other client?

If run through the Neo4j Browser, preface the query with :auto

I'm running via the Neo4j Browser. Where do I put :auto?

@paolodipietro58

2 Likes

@dana.canzano Well, it run and load the data, but at the end it retured this error ailed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Data cannot be cloned, out of memory..

It looks strange, as there is a lot of memory and the swap file has not been used.