Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-29-2022 10:29 PM - edited 11-29-2022 10:30 PM
The following is my query
##################################
CALL apoc.periodic.iterate('
CALL apoc.load.json("1114-Sysmon-02to01.json") YIELD value return value','
UNWIND value.Event AS col_event
WITH col_event
WHERE col_event.System.EventID = 1
CREATE(process:Process{eventid: coalesce(col_event.System.EventID, "No ID"),
euid:col_event.System.EventRecordID,
pid:col_event.EventData.ProcessGuid})',
{batchSize:10000, iterateList:true, parallel:true})
CALL{
MATCH(e:Process)
MATCH(f:Process)
WHERE e.euid = f.euid AND f.parentID IS NOT NULL
SET e.pid2 = e.pid,
f.pid2 = f.parentID
}
CALL apoc.periodic.iterate("MATCH(e:Process), (f:Process) WHERE e.euid = f.euid AND f.parentID IS NOT NULL AND e.computer IS NOT NULL RETURN e,f",
"CREATE(f)-[r:create_process_to]->(e)",
{batchSize:10000, parallel: true})
##################################
I try query above in once but the following error shows :
Procedure call inside a query does not support naming results implicitly (name explicitly using `YIELD` instead)
Although I can divided above into three pieces to run, but in order to check the performance and efficiency, it must be queried in the same time.
Question : Is there any method to query above code in the same time (don't need to split into pieces)
Thanks.
Solved! Go to Solution.
11-30-2022 01:12 AM - edited 11-30-2022 01:13 AM
apoc.periodic.iterate returns values. Try returning at least one variable to the first method call. Add to the second too, if just the first does not resolve your error. ‘Yield total’ should be sufficient.
https://neo4j.com/labs/apoc/4.1/overview/apoc.periodic/apoc.periodic.iterate/#_output_parameters
11-30-2022 01:12 AM - edited 11-30-2022 01:13 AM
apoc.periodic.iterate returns values. Try returning at least one variable to the first method call. Add to the second too, if just the first does not resolve your error. ‘Yield total’ should be sufficient.
https://neo4j.com/labs/apoc/4.1/overview/apoc.periodic/apoc.periodic.iterate/#_output_parameters
11-30-2022 03:09 AM
It's done. Appreciate about it !
All the sessions of the conference are now available online