cancel
Showing results for 
Search instead for 
Did you mean: 

RUN IN TRANSACTION error

paolodipietro58
Graph Voyager

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?

1 ACCEPTED SOLUTION
5 REPLIES 5

dana_canzano
Neo4j
Neo4j

@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?

@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.

How could this be done if not using the Neo4j browser? I'm using the .net driver and .net client packages, and I have seen that this behavior differs depending on how Neo4j is accessed, but I haven't found the answer. I have the same error. Anything would help. Thank you!