Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Superhero network use case. Proposed PGQL for finding neighbors returns 0 results

Luis Rodriguez FernandezJun 16 2017 — edited Aug 20 2020

Hello there,

It looks like there is something wrong with the example query. It seems that the graph is built correctly:

pgx>  G = session.readGraphWithProperties("/home/lurodrig/development/workspaces/openlab/pgx/superhero-network/hero-network.csv.json").undirect()

==> PgxGraph[name=hero-network_sub-graph_1,N=6426,E=574467,created=1497625143428]

pgx> G.getNumEdges()

==> 574467

pgx> G.getNumVertices()

==> 6426

I can run the pageRank algorithm:

pgx> pageRank = analyst.pagerank(G, 0.0001, 0.85, 100)

==> VertexProperty[name=pagerank,type=double,graph=hero-network_sub-graph_1]

pgx> pageRank.getTopKValues(10)

==> PgxVertex[ID=CAPTAIN AMERICA]=0.0110658307488833

==> PgxVertex[ID=SPIDER-MAN/PETER PAR]=0.010883248192971052

==> PgxVertex[ID=IRON MAN/TONY STARK ]=0.00822400232340639

==> PgxVertex[ID=WOLVERINE/LOGAN ]=0.007184179121356004

==> PgxVertex[ID=THOR/DR. DONALD BLAK]=0.007111076442093899

==> PgxVertex[ID=THING/BENJAMIN J. GR]=0.007040224708813351

==> PgxVertex[ID=HUMAN TORCH/JOHNNY S]=0.006715685790441994

==> PgxVertex[ID=MR. FANTASTIC/REED R]=0.006474776413326844

==> PgxVertex[ID=SCARLET WITCH/WANDA ]=0.006292296186722285

==> PgxVertex[ID=INVISIBLE WOMAN/SUE ]=0.00607097561105347

[rest of output truncated]

I can do some basic pgql:

pgx> G.queryPgql("SELECT n.id(), n.pagerank WHERE (n) ORDER BY n.pagerank DESC").print(10)

+-----------------------------------------------+

| n.id()                 | n.pagerank           |

+-----------------------------------------------+

| "CAPTAIN AMERICA"      | 0.0110658307488833   |

| "SPIDER-MAN/PETER PAR" | 0.010883248192971052 |

| "IRON MAN/TONY STARK " | 0.00822400232340639  |

| "WOLVERINE/LOGAN "     | 0.007184179121356004 |

| "THOR/DR. DONALD BLAK" | 0.007111076442093899 |

| "THING/BENJAMIN J. GR" | 0.007040224708813351 |

| "HUMAN TORCH/JOHNNY S" | 0.006715685790441994 |

| "MR. FANTASTIC/REED R" | 0.006474776413326844 |

| "SCARLET WITCH/WANDA " | 0.006292296186722285 |

| "INVISIBLE WOMAN/SUE " | 0.00607097561105347  |

+-----------------------------------------------+

==> null

However when I ask for neighbors...

pgx> Results = G.queryPgql("SELECT x WHERE\

pgx>          (a @ 'SHANG-CHI')->(x),\

pgx>          (b @ 'WHITE TIGER/HECTOR A')->(x),\

pgx>          (c @ 'IRON FIST/DANIEL RAN')->(x)")

==> PgqlResultSetImpl[graph=hero-network_sub-graph_1,numResults=0]

... I do not get any result

And the characters are there, e.g:

pgx> G.queryPgql("SELECT n.id(), n.pagerank WHERE (n@'SHANG-CHI')").print()

+------------------------------------+

| n.id()      | n.pagerank           |

+------------------------------------+

| "SHANG-CHI" | 7.022436563813896E-4 |

+------------------------------------+

==> null

My environment looks like this:

Description:    Ubuntu 16.04.2 LTS

Java(TM) SE Runtime Environment (build 1.8.0_101-b13)

Java HotSpot(TM) 64-Bit Server VM

PGX Shell 2.4.1

Perhaps am I missing something?

Thanks in advance,

Luis

This post has been answered by oskarvanrest-Oracle on Jun 19 2017
Jump to Answer

Comments

RotBlitz

You cannot send email from a dynamic IP address. You must use an SMTP relay service for this purpose.  All of this has nothing to do with DynDNS or services they offer.

1 - 1

Post Details

Added on Jun 16 2017
5 comments
756 views