How to resolve error using Where Clause on Graph edge data?

29 views Asked by At

I have a simple Graph and can run the following query which brings back the NAME property of "Customer" nodes along with the NODETYPE property of edges named "SIMILAR_TO":

SELECT NAME, SIMILAR_TO.NODETYPE FROM CUSTOMER USING GRAPH 
MY_CUSTOMER_PROSPECT_GRAPH;

This yields expected tabular data. Now I want to filter the edges to grab only those of a certain NODETYPE by running this SQL:

SELECT NAME, SIMILAR_TO.NODETYPE FROM CUSTOMER USING GRAPH 
MY_CUSTOMER_PROSPECT_GRAPH
where SIMILAR_TO.NODETYPE = 'SIM';

But this fails with the following error:

could not handle api call, failure reason : execution of scheduler plan 
failed: found problem category: exception for node id 8 - error code is 58 
error msg: [ Graph Semantics ] Query parse error (code 58): unexpected 
expression: (NODE_5.SIMILAR_TO.NODETYPE = 'SIM');

Similarly, you cannot use {Edge}.NODEID in the where clause either (same error). This appears to be new to version 2.1 (2.1.35 is the exact version I'm running) as I am trying to migrate existing graph models that ran correctly in previous versions. Is there a workaround for this?

0

There are 0 answers