gds.graph.project creates and stores a named in-memory graph in the GDS graph catalog so graph algorithms can access a selected network. Native projection uses a CALL statement with a graph name, node projection, relationship projection, and optional configuration. section 5.2.1
Native projection defines the graph by selecting:
- The graph name used when executing algorithms. section 5.2.1
- The node subset, such as User nodes. section 5.2.1
- The relationship subset, such as FOLLOWS relationships; relationships are skipped when either adjacent node is excluded. section 5.2.1
- Optional node, relationship, and property configuration for richer or weighted networks. section 5.2.1
Project a followers network
CALL gds.graph.project('follower-network', 'User', 'FOLLOWS') creates a cataloged in-memory graph containing User nodes connected by FOLLOWS relationships. section 5.2.1
The same procedure also supports Cypher projection, which describes source and target nodes with Cypher and can filter, transform, or create virtual connections without first materializing them. This form uses gds.graph.project in a WITH or RETURN clause, is more expressive, and performs worse than native projection on larger or production graphs. section 6.1.1
Build a weighted retweet network
A Cypher projection matches publishing and retweet paths, counts each source-target connection as weight, and returns the projected graph. The amplify example contains 1,828 nodes and 2,719 relationships. section 6.1.1
Listing 5.4 Native projection syntax to create a named graph in the graph catalog
CALL gds.graph.project( graphName, nodeProjection, relationshipProjection, optional configuration )
Use the syntax listing to inspect the procedure’s required arguments and optional configuration position. section 5.2.1
