Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

SAP HANA GRAPH backward Traversal

$
0
0

Hi,

 

I was trying to use SAP HANA Graph Forward and Backward

 

I have created a directed graph from uri:1000335%2D1006 (source vertex) to uri:3000050%2D1006 (destination vertex). (and to several other vertices) with an edge type "PART_PRODUCT"

 

Forward Traversal Query

CALL GEM(

'USE WORKSPACE uri:MYWS;

$source = {uri:1000335%2D1006};

$destinations = $source-[@ais:type = ''PART_PRODUCT'']->;

RESULT uri:RESULT FROM $destinations ;');

SELECT * FROM MYSCHEMA_HANA.RESULT;

 

Backward traversal Query

CALL GEM('USE WORKSPACE uri:MYWS;

$source = {uri:3000050%2D1006};

$destinations = $source<-[@ais:type = ''PART_PRODUCT'']-;

RESULT uri:RESULT FROM $destinations ;');

SELECT * FROM MYSCHEMA_HANA.RESULT;

 

I am getting the following result for Forward Traversal.

com.sap.ais.tax.core.uriENTITYIDcom.sap.ais.tax.core.techtypecom.sap.ais.tax.core.supertermcom.sap.ais.tax.core.typecom.sap.ais.tax.core.namecom.sap.ais.tax.core.description
13000050-1006  57PRODUCT 
23001907-1006  84PRODUCT 
33001908-1006  85PRODUCT 

 

But some random result for backward traversal.

com.sap.ais.tax.core.uri  ENTITYIDcom.sap.ais.tax.core.techtype com.sap.ais.tax.core.supertermcom.sap.ais.tax.core.typecom.sap.ais.tax.core.name
1com.sap.ais.tax.core.boolean9com.sap.ais.tax.core.undefinedcom.sap.ais.tax.core.attributecom.sap.ais.tax.core.termBoolean 


Can someone suggest why backward traversal Query is not giving me the expected result? Or if the query needs to be modified?

 

Thank you.

 

Regards
Arun.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>