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.

apoc.custom.asProcedure returns 3 null records, despite no return statement

I created a custom proc that I don't want/need any output from, however when called, it returns 3 records with the value "null". How do I disable output from this custom proc?
3X_2_a_2a36a7e6c808323ceca22c21668c6ebd5354128f.jpeg

Here is the code:

CALL apoc.custom.asProcedure(
	 'resetJobStepCounter'
	,"CALL apoc.cypher.runMany(\"
		//create a dummy var to hold/advance our Job Step for display during load process
		MATCH (js:DUAL_JOBSTEP) 
		DETACH DELETE js
		;
		MERGE (js:DUAL_JOBSTEP)
		SET  js.tmsp = datetime.truncate('second', datetime({ timezone: 'America/Chicago' }))
			,js.STEP_NBR = 0
		//RETURN js as DUAL_JOBSTEP
		;
	  \"
	  ,{})
	 "
    ,'write'
    ,[]
    ,[]
    ,"Resets the jobstep counter for cypher script monitoring"
	)
//CALL custom.resetJobStepCounter; //YIELD DUAL_JOBSTEP;

Here are my Neo4j environment details:
Neo4j Browser version: 4.0.5
Neo4j Server version: 4.0.3

1 REPLY 1

Procedures return data / columns when called standalone

so if you have several statements in runMany it will at least return that many rows.

I don't think that currently asProcedure supports void procedures who don't return anything.