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;
$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.uri | ENTITYID | com.sap.ais.tax.core.techtype | com.sap.ais.tax.core.superterm | com.sap.ais.tax.core.type | com.sap.ais.tax.core.name | com.sap.ais.tax.core.description | |
| 1 | 3000050-1006 | 57 | ? | ? | PRODUCT | ? | ? |
| 2 | 3001907-1006 | 84 | ? | ? | PRODUCT | ? | ? |
| 3 | 3001908-1006 | 85 | ? | ? | PRODUCT | ? | ? |
But some random result for backward traversal.
| com.sap.ais.tax.core.uri | ENTITYID | com.sap.ais.tax.core.techtype | com.sap.ais.tax.core.superterm | com.sap.ais.tax.core.type | com.sap.ais.tax.core.name | |
| 1 | com.sap.ais.tax.core.boolean | 9 | com.sap.ais.tax.core.undefined | com.sap.ais.tax.core.attribute | com.sap.ais.tax.core.term | Boolean |
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.