Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-02-2022 03:10 AM
Hi
using this query with APOC 4.4.0.3
MATCH (p:Clifor )
RETURN p.cliforId, apoc.node.degree.in(p) AS input, apoc.node.degree.out(p) AS output LIMIT 10;
I receive the expected data.
Now I'm trying to set properties but seems not working
MATCH (p:Clifor )
WITH p
call {
WITH p
RETURN apoc.node.degree.in(p) as degIn
}
WITH p, degIn
call {
WITH p
RETURN apoc.node.degree.out(p) as degOut
}
WITH p, degIn, degOut
set p.degreeIn = degIn, p.degreeOut = degOut;
Where I'm wrong?
Please Help
Rinaldo
Solved! Go to Solution.
04-02-2022 03:44 AM
The following doesn’t work?
MATCH (p:Clifor)
WITH p, apoc.node.degree.in(p) AS degIn, apoc.node.degree.out(p) AS degOut
LIMIT 10
set p.degreeIn = degIn, p.degreeOut = degOut
04-02-2022 03:44 AM
The following doesn’t work?
MATCH (p:Clifor)
WITH p, apoc.node.degree.in(p) AS degIn, apoc.node.degree.out(p) AS degOut
LIMIT 10
set p.degreeIn = degIn, p.degreeOut = degOut
04-02-2022 03:50 AM
Hi Gary,
yes it works, looking your suggestion I try this too
MATCH (p:Clifor)
set p.degreeIn = apoc.node.degree.in(p, "FATTURA")
set p.degreeOut = apoc.node.degree.out(p, "FATTURA")
RETURN count(p)
Works fine
Thanks for your help
Rinaldo
04-02-2022 04:32 AM
Your welcome…anytime.
All the sessions of the conference are now available online