Strongly Connected Components

Hello,

I have this query

CALL gds.alpha.scc.stream({

   nodeQuery: 'MATCH (Compartment{dbId:74700})<-[:compartment]- 
  (rle:Reaction{speciesName:"Homo sapiens"})-[:input]-> 
  (pe:PhysicalEntity{speciesName:"Homo sapiens"}) return id(rle) AS id UNION MATCH 
  (Compartment{dbId:74700})<-[:compartment]-(rle:Reaction{speciesName:"Homo 
   sapiens"})-[:input]->(pe:PhysicalEntity{speciesName:"Homo sapiens"})   RETURN id(pe) 
   AS id',

  relationshipQuery: 'MATCH (Compartment{dbId:74700})<-[:compartment]- 
  (rle:Reaction{speciesName:"Homo sapiens"})-[i:input]-> 
  (pe:PhysicalEntity{speciesName:"Homo sapiens",stId:"R-HSA-9610136"})- 
  [:compartment]->(Compartment{dbId:74700}) RETURN id(rle) AS source, id(pe) AS 
  target' }) 
 YIELD nodeId, componentId 
  RETURN gds.util.asNode(nodeId) AS Name, componentId AS Component

I would like to use the scc algorithm.

My problem is That I want to display only the nodes that have an 'input' relationship.
Currently this query shows me all the relationships of the various nodes.
You can help me?
Thanks

Dear all,

I am using Neo4j Desktop, Graph Data Science Library 2.2.3, and Neo4j Server 4.4.14.

I am wondering whether the interface of

gds.alpha.scc.stream

is changed?

Since when I try the queries in this discussion, I get

Type mismatch: expected String but was Map (line 2, column 27 (offset: 39))
" CALL gds.alpha.scc.stream({"
^}

Thanks in advance for your answer!

Pierre

Hello @pjljvandelaar :slightly_smiling_face:

The procedure name has changed, check here.

Regards,
Cobra

Dear Cobra,

I really need strongly connected and not weakly connected components.

I solved it by first creating a subgraph (using gds.graph.project[.cypher]),
then calling the current scc function on that subgraph,
and finaly droppping the subgraph (using gds.graph.drop).

Greetings,
Pierre

Oh sorry, the current documentation of SCC is here.