I try to use Neo4j to find clients with similar purchases. My test DB is:
CREATE (nMike:Client {name:'Mike'})
CREATE (nAlice:Client {name:'Alice'})
CREATE (nMark:Client {name:'Mark'})
CREATE (nCharles:Client {name:'Charles'})
CREATE (nMilk:Product {product_name:'Milk'})
CREATE (nBread:Product {product_name:'Bread'})
CREATE (nBeer:Product {product_name:'Beer'})
CREATE (nSugar:Product {product_name:'Sugar'})
CREATE (nFlour:Product {product_name:'Flour'})
CREATE (nMike)-[:BOUGHT]->(nMilk)
CREATE (nMike)-[:BOUGHT]->(nBread)
CREATE (nMike)-[:BOUGHT]->(nBeer)
CREATE (nMike)-[:BOUGHT]->(nSugar)
CREATE (nAlice)-[:BOUGHT]->(nMilk)
CREATE (nAlice)-[:BOUGHT]->(nBread)
CREATE (nMark)-[:BOUGHT]->(nBread)
CREATE (nMark)-[:BOUGHT]->(nBeer)
CREATE (nCharles)-[:BOUGHT]->(nMilk)
CREATE (nCharles)-[:BOUGHT]->(nFlour);
Now I try to create graph. If I get it correctly, 'product_name' property matters - I want to find clients with similar product purchase.
So I try to execute code:
CALL gds.graph.project(
'graph',
{
Client: {properties: 'name'},
Product: {properties: 'product_name'}
},
{BOUGHT: {orientation: 'UNDIRECTED'}}
)
But it fails: Failed to invoke procedure gds.graph.project
: Caused by: java.lang.UnsupportedOperationException: Loading of values of type String is currently not supported
What is wrong here? Looks exactly how it should be: https://neo4j.com/docs/graph-data-science/current/management-ops/graph-creation/graph-project/
In fact I do not need 'name' property for Client nodes but getting error if empty.
Some suggestions please?