Creating a subgraph, cannot filter nodes

RooSoft
Node

Having a large graph named myGraph. Trying to extract a subgraph containing only the most specific nodes. Here is how I create it.

CALL gds.beta.graph.create.subgraph(
  'large-channels',
  'myGraph',
  'n.channel_count > 35',
  'r.capacity >= 2000000 AND r.fee_rate < 50'
)
YIELD graphName, fromGraphName, nodeCount, relationshipCount

When the 3rd parameter, thus the node filter, is '*', the subgraph gets created successfully, filtered by relationship capacity and fee_rate.

Problem is, I got to go further by filtering the nodes themselves by specific properties. They all are the same type and clearly have a channel_count property. When I execute the above query, I get this error:

Failed to invoke procedure gds.beta.graph.create.subgraph: Caused by: org.neo4j.gds.beta.filter.expression.SemanticErrors: Semantic errors while parsing expression:
Unknown property channel_count.

Tried with many other existing node properties, they all fail, including with id. So the only thing I've successfully put in that 3rd parameter for now is '*'.

What am I doing wrong?

1 ACCEPTED SOLUTION

RooSoft
Node

Nevermind, newbie problem. The field was in the database, but I forgot to add the property in the original gds.graph.create, which the gds.beta.graph.create.subgraph was based on.

View solution in original post

1 REPLY 1

RooSoft
Node

Nevermind, newbie problem. The field was in the database, but I forgot to add the property in the original gds.graph.create, which the gds.beta.graph.create.subgraph was based on.