- neo4j 5.5.0, gds 2.4.5
I am trying to create a new gds project by executing the following cypher:
MATCH (source:staff {dept: 'IT'})-[r:relation]->(target:staff {dept: 'IT'})
WITH gds.graph.project(
'Temp',
source,
target,
{
sourceNodeProperties: source {.pos},
targetNodeProperties: target {.pos}
}
) as g
RETURN g
Cypher works while node property 'pos' is intiger. However, in my database, this attribute has been set to be string, like 'product manager', 'UI designer', etc. Since I am not authorized to alter my datasource, I cannot use 'set' function to rewrite this attribute.
Suppose I have such dictionary for attribute 'pos':
{0: product manager, 1: UI designer, 2: data scientist}
Is there any way to insert a case when, or other workable mapping syntax, to create a new GDS project with the above mapping affected?