11// Read a property from the projection into the Graph. Variables: dependencies_projection, dependencies_projection_write_property
22
3- CALL gds .fastRP .stream (
4- $dependencies_projection + '-without-empty' , {
5- embeddingDimension : toInteger ($dependencies_projection_embedding_dimension )
6- , relationshipWeightProperty : $dependencies_projection_weight_property
7- }
3+ CALL gds .graph .nodeProperties .stream (
4+ $dependencies_projection + '-without-empty'
5+ ,[$dependencies_projection_write_property ]
86)
9- YIELD nodeId , embedding
7+ YIELD nodeId , nodeProperty , propertyValue
108 WITH gds .util .asNode (nodeId ) AS codeUnit
11- ,embedding
9+ ,nodeProperty AS propertyName
10+ ,propertyValue
1211OPTIONAL MATCH (artifact :Artifact )- [ : CONTAINS ] -> (codeUnit )
1312RETURN DISTINCT coalesce (codeUnit .fqn , codeUnit .fileName , codeUnit .name ) AS codeUnitName
13+ ,coalesce (replace (last (split (codeUnit .fileName , '/' )), '.jar' , '' ), codeUnit .name ) AS shortCodeUnitName
14+ ,propertyName
15+ ,propertyValue
1416 ,coalesce (codeUnit .leidenCommunityId , 0 ) AS communityId
1517 ,coalesce (codeUnit .centralityPageRank , 0.01 ) AS centrality
16- ,replace (last (split (artifact .fileName , '/' )), '.jar' , '' ) AS artifactName
17- ,embedding
18+ ,replace (last (split (artifact .fileName , '/' )), '.jar' , '' ) AS artifactName
0 commit comments