cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to get unique property value in return query in neo4j

Hello Team,

I am using neo4j cypher query where i am trying to return 4 different property names and their values. In this 1 property is having duplicate value but its other 3 properties are having unique values. Please help me in telling the way to get only unique property name and value in return for any specific column name.

Let say we have Point A and Point B , Point A is connected to Point B and vice-versa.
In this case , Path name between A and B is duplicated but with unique properties of A & B except path name is it is common between 2 points.

Regards
AK

7 REPLIES 7

Hello Akshat,

You should not model your data to have 2 paths with the same label between two nodes, unless you are using full-text schema indexes where you can include a relationship property in the index.

Elaine

Hello Elaine,

Thanks a lot for the quick response.

Apologies as I did not understand your suggestion. Please elaborate in detail if possible.

Let say we have Point A and Point B , Point A is connected to Point B and vice-versa.
In this case , Path name between A and B is X which will be duplicated where we navigate from A to B via X and B to A via X only but with unique properties of A & B except path name is it is common between 2 points.

Regards
AK

Is the relationship direction significant? If so, then A-->B means something different than B-->A and you would need to make sure direction is specified in the query. (similar to the Facebook analagy :IS_FRIENDS_WITH where direction matters.

If the direction is not significant, then (A)-[r:IS_RELATED_TO]-(B) with properties r.x,r.y vs. (A)-[r2:IS_RELATED_TO]-(B) with properties r2.z are definitely different paths/queries, but an index can never be used, unless the index is a full-text schema index where you can use property values of relationships. All other indexes can only be created for node property values.

Elaine

Adding More information by sharing query and result.

Please note : Path name is unique in source but while generating the result using neo4j csv query , I am getting the path_name twice but with other attributes are unique.

SOURCE DATA QUERY
with "jdbc:oracle:thin:scott/tiger@1.2.3.4:1521/XCOMPRD_STB" as url
CALL apoc.load.jdbc(url,"select PATH_ASIDE_EQUIPMENT , PATH_ZSIDE_EQUIPMENT , PATH_ZSIDE_PORT , PATH_ASIDE_PORT , PATH_NAME from RJILCUSTOMISATIONS.RIL_UTM_PATH_V where path_type = 'UBR ACCESS LINK' and PATH_NAME = 'INMUMUMBSIKWNB6002_INMUMUMBSIKWNB0002_IB5_3' AND rownum<10") YIELD row return row.PATH_ASIDE_EQUIPMENT , row.PATH_ZSIDE_EQUIPMENT , row.PATH_ZSIDE_PORT , row.PATH_ASIDE_PORT , row.PATH_NAME

Result is attached

row.PATH_ASIDE_EQUIPMENT row.PATH_ZSIDE_EQUIPMENT row.PATH_ZSIDE_PORT row.PATH_ASIDE_PORT row.PATH_NAME
INMUMUMBSIKWNB6002ENBIB5001 INMUMUMBSIKWNB0002IBSIB5001 INMUMUMBSIKWNB0002IBSIB5001 / AS-IB440-CHS/CHASSIS/DATA INMUMUMBSIKWNB6002ENBIB5001 / AS-IB440-CHS/CHASSIS/DATA INMUMUMBSIKWNB6002_INMUMUMBSIKWNB0002_IB5_3

Below is my NEO4J Query which is giving duplicate path_name in result.

MATCH p = (sa:SITE)-[rsa]-(ea:CONTAINER) –[ra*]-(n:PATH)-[rb*]-(eb:CONTAINER)-[rsb]-(sb:SITE) RETURN
ea.EQUIP_VENDOR as VENDOR,
sa.SITE_CIRCLE as A_End_CircleName,
sb.SITE_CIRCLE as B_End_CircleName,
sa.SITE_R4G_STATE as A_SITE_R4G_STATE,
sb.SITE_R4G_STATE as B_SITE_R4G_STATE,
sa.SITE_AREACODE as A_SITE_AREA_NAME,
sb.SITE_AREACODE as B_SITE_AREA_NAME,
sa.SITE_CITY as A_End_City_Name,
sb.SITE_CITY as B_End_City_Name,
sa.JIO_CENTER as A_JIO_CENTER,
sb.JIO_CENTER as B_JIO_CENTER,
ea.EQUIP_EMS_INSTANCENAME as AEnd_EMS_Name,
eb.EQUIP_EMS_INSTANCENAME as BEnd_EMS_Name,
ea.SAPID as AEND_SAP_ID,
eb.SAPID as BEND_SAP_ID,
ea.EQUIP_IPV6_DEFAULT_GATEWAY as GWIP,
ea.EQUIP_IPV6 as A_END_IPV6,
eb.EQUIP_IPV6 as B_END_IPV6,
n.PATH_ASIDE_EQUIPMENT as NEID_A,
n.PATH_ZSIDE_EQUIPMENT as NEID_B,
sa.SITE_FRIENDLY_NAME as A_SITE_FRIENDLYNAME,
sb.SITE_FRIENDLY_NAME as B_SITE_FRIENDLYNAME,
ea.EQUIP_POLARIZATION as A_POLARIZATION_HV,
eb.EQUIP_POLARIZATION as B_POLARIZATION_HV,
sa.SITE_NAME as A_SITE_NAME,
sa.SITE_LATITUDE as A_SITE_LATITUDE,
sa.SITE_LONGITUDE as A_SITE_LONGITUDE,
sb.SITE_NAME as B_SITE_NAME,
sb.SITE_LATITUDE as B_SITE_LATITUDE,
sb.SITE_LONGITUDE as B_SITE_LONGITUDE,
ea.EQUIP_DATA_PORT_NO as A_Data_Port_No,
eb.EQUIP_DATA_PORT_NO as B_Data_Port_No,
ea.EQUIP_RX_LEVEL as A_RX_Level,
eb.EQUIP_RX_LEVEL as B_Rx_Level,
n.PATH_ASIDE_EQUIPMENT+"-"+n.PATH_ZSIDE_EQUIPMENT as HOP_NAME,
n.PATH_NAME as PATH_NAME
limit 25

Relationship direction is significant as we need data from 1 direction only but for both Point A and Point B like MATCH p = (sa:SITE)-[rsa]->(ea:CONTAINER) –[ra*]->(n:PATH)-[rb*]-(eb:CONTAINER)-[rsb]-(sb:SITE).
RETURN

ea.EQUIP_VENDOR as VENDOR,
sa.SITE_CIRCLE as A_End_CircleName,
sb.SITE_CIRCLE as B_End_CircleName,
sa.SITE_R4G_STATE as A_SITE_R4G_STATE,
sb.SITE_R4G_STATE as B_SITE_R4G_STATE,
sa.SITE_AREACODE as A_SITE_AREA_NAME,
sb.SITE_AREACODE as B_SITE_AREA_NAME,
sa.SITE_CITY as A_End_City_Name,
sb.SITE_CITY as B_End_City_Name,
sa.JIO_CENTER as A_JIO_CENTER,
sb.JIO_CENTER as B_JIO_CENTER,
ea.EQUIP_EMS_INSTANCENAME as AEnd_EMS_Name,
eb.EQUIP_EMS_INSTANCENAME as BEnd_EMS_Name,
ea.SAPID as AEND_SAP_ID,
eb.SAPID as BEND_SAP_ID,
ea.EQUIP_IPV6_DEFAULT_GATEWAY as GWIP,
ea.EQUIP_IPV6 as A_END_IPV6,
eb.EQUIP_IPV6 as B_END_IPV6,
n.PATH_ASIDE_EQUIPMENT as NEID_A,
n.PATH_ZSIDE_EQUIPMENT as NEID_B,
sa.SITE_FRIENDLY_NAME as A_SITE_FRIENDLYNAME,
sb.SITE_FRIENDLY_NAME as B_SITE_FRIENDLYNAME,
ea.EQUIP_POLARIZATION as A_POLARIZATION_HV,
eb.EQUIP_POLARIZATION as B_POLARIZATION_HV,
sa.SITE_NAME as A_SITE_NAME,
sa.SITE_LATITUDE as A_SITE_LATITUDE,
sa.SITE_LONGITUDE as A_SITE_LONGITUDE,
sb.SITE_NAME as B_SITE_NAME,
sb.SITE_LATITUDE as B_SITE_LATITUDE,
sb.SITE_LONGITUDE as B_SITE_LONGITUDE,
ea.EQUIP_DATA_PORT_NO as A_Data_Port_No,
eb.EQUIP_DATA_PORT_NO as B_Data_Port_No,
ea.EQUIP_RX_LEVEL as A_RX_Level,
eb.EQUIP_RX_LEVEL as B_Rx_Level,
n.PATH_ASIDE_EQUIPMENT+"-"+n.PATH_ZSIDE_EQUIPMENT as HOP_NAME,
n.PATH_NAME as PATH_NAME

Please help me with query modification.

I don't think what you want is possible. If the properties themselves vary, such that the combination of all values is distinct per row, and if you're set on returning all of these properties and you don't want to use aggregation, then you're out of luck. DISTINCT only works across the entire row, and there is no way to represent in the returned record/row format what you want.

Now if you want to aggregate, that's a different issue. The variables that you want to be distinct should be the grouping key (not aggregated), and everything else needs to be aggregated in some way, but in a way that the results still make sense and are useful to you. This is because when you do an aggregation, the non-aggregation variables (which are referred to as the grouping key) become distinct as a consequence as everything else gets grouped.

Now all this said, perhaps we're misunderstanding what you want here. I think it would best help if you provided an example graph, and desired example output showing exactly what you want. Keep in mind this must be in a record/row format, that is each row is a record, and each row will have a value for the given variable / column name. It is not possible to have a column that has a different number of rows than others, which seems to be what you're asking, because results are row/record oriented, not column oriented.

Hello Andrew,

Thanks for explaining in detail. I did not get the last line of your explanation of 3rd paragraph.
Please help in it again.
What I am getting using Neo4j query is attached and what I exactly need is also attached in form of excel sheet. Also attaching the Neo4j browser screen shot to see the labels and relationship i am using in cypher query.
Please note HOP_NAME column and PATH_NAME column is having same values except - and _. Hence consider only HOP_NAME.

Below is the Neo4J output file ( current file )

PATH_NAME VENDOR A_End_CircleName B_End_CircleName A_SITE_R4G_STATE B_SITE_R4G_STATE A_SITE_AREA_NAME B_SITE_AREA_NAME A_End_City_Name B_End_City_Name A_JIO_CENTER B_JIO_CENTER AEnd_EMS_Name BEnd_EMS_Name AEND_SAP_ID BEND_SAP_ID GWIP A_END_IPV6 B_END_IPV6 NEID_A NEID_B A_SITE_FRIENDLYNAME B_SITE_FRIENDLYNAME A_POLARIZATION_HV B_POLARIZATION_HV A_SITE_NAME A_SITE_LATITUDE A_SITE_LONGITUDE B_SITE_NAME B_SITE_LATITUDE B_SITE_LONGITUDE A_Data_Port_No B_Data_Port_No A_RX_Level B_Rx_Level HOP_NAME
INUELCKNNLMTTW6002_INUELCKNHRIPNB0001_IB5_1 AIRSPAN UTTAR PRADESH(EAST) UTTAR PRADESH(EAST) Uttar Pradesh (East) Uttar Pradesh (East) Malak Nilmantha Lucknow Lucknow Ashiyana Ashiyana NVMBD1BPH210V01 NVMBD1BPH210V01 I-UE-LCKN-OSC-0606 I-UE-LCKN-ENB-I050 null 2405:200:109:100:7:2:585:305 2405:200:109:100:7:2:585:304 INUELCKNNLMTTW6002ENBIB5001 INUELCKNHRIPNB0001OSCIB5001 Dipty Ganj Malak null null INUELCKNHRIPNB0001 26.78066061 80.97609632 INUELCKNNLMTTW6002 26.78265 80.97418 NNI-1 ge-0/0/3 null null INUELCKNNLMTTW6002ENBIB5001-INUELCKNHRIPNB0001OSCIB5001
INUELCKNNLMTTW6002_INUELCKNHRIPNB0001_IB5_1 AIRSPAN UTTAR PRADESH(EAST) UTTAR PRADESH(EAST) Uttar Pradesh (East) Uttar Pradesh (East) Nilmantha Malak Lucknow Lucknow Ashiyana Ashiyana NVMBD1BPH210V01 NVMBD1BPH210V01 I-UE-LCKN-ENB-I050 I-UE-LCKN-OSC-0606 null 2405:200:109:100:7:2:585:304 2405:200:109:100:7:2:585:305 INUELCKNNLMTTW6002ENBIB5001 INUELCKNHRIPNB0001OSCIB5001 Malak Dipty Ganj null null INUELCKNNLMTTW6002 26.78265 80.97418 INUELCKNHRIPNB0001 26.78066061 80.97609632 ge-0/0/3 NNI-1 null null INUELCKNNLMTTW6002ENBIB5001-INUELCKNHRIPNB0001OSCIB5001
INBRNGCHXXXXTW6002_INBRKKRXXXXXNB0003_IB5_2 AIRSPAN BIHAR BIHAR Bihar Bihar NA null Tehsil Tehsil Bhagalpur Bhagalpur NVMBD1BPH190D00 NVMBD1BPH190D00 I-BR-NGCH-ENB-6004 I-BR-KKRX-OSC-0002 null 2405:200:139:200:7:2:585:3384 2405:200:139:200:7:2:585:3385 INBRNGCHXXXXTW6002ENBIB5001 INBRKKRXXXXXNB0003OSCIB5001 TULSIPUR Tulsipur null null INBRNGCHXXXXTW6002 25.36587 87.04401 INBRKKRXXXXXNB0003 25.36777487 87.03548551 GigabitEthernet0/0/3 Ethernet 1 null null INBRNGCHXXXXTW6002ENBIB5001-INBRKKRXXXXXNB0003OSCIB5001
INBRNGCHXXXXTW6002_INBRKKRXXXXXNB0003_IB5_2 AIRSPAN BIHAR BIHAR Bihar Bihar null NA Tehsil Tehsil Bhagalpur Bhagalpur NVMBD1BPH190D00 NVMBD1BPH190D00 I-BR-KKRX-OSC-0002 I-BR-NGCH-ENB-6004 null 2405:200:139:200:7:2:585:3385 2405:200:139:200:7:2:585:3384 INBRNGCHXXXXTW6002ENBIB5001 INBRKKRXXXXXNB0003OSCIB5001 Tulsipur TULSIPUR null null INBRKKRXXXXXNB0003 25.36777487 87.03548551 INBRNGCHXXXXTW6002 25.36587 87.04401 Ethernet 1 GigabitEthernet0/0/3 null null INBRNGCHXXXXTW6002ENBIB5001-INBRKKRXXXXXNB0003OSCIB5001
INUWSMBLXXXXTW0021_INUWSMBLXXXXNB0004_IB5_1 AIRSPAN UTTAR PRADESH(WEST) UTTAR PRADESH(WEST) Uttar Pradesh (West) Uttar Pradesh (West) Chakali Panni Gram Tehsil Tehsil Sambhal Sambhal NVMBD1BPH210V01 NVMBD1BPH210V01 I-UW-SMBL-ENB-0035 I-UW-SMBL-OSC-0049 null 2405:200:112:A00:7:2:585:904 2405:200:112:A00:7:2:585:905 INUWSMBLXXXXTW0021ENBIB5001 INUWSMBLXXXXNB0004OSCIB5001 Sarai Tareen, Markaz Wali Masjid Sarai Tarren null null INUWSMBLXXXXTW0021 28.55394 78.56326 INUWSMBLXXXXNB0004 28.55181532 78.56489494 GigabitEthernet0/0/3 NNI-1 null null INUWSMBLXXXXTW0021ENBIB5001-INUWSMBLXXXXNB0004OSCIB5001
INUWSMBLXXXXTW0021_INUWSMBLXXXXNB0004_IB5_1 AIRSPAN UTTAR PRADESH(WEST) UTTAR PRADESH(WEST) Uttar Pradesh (West) Uttar Pradesh (West) Panni Gram Chakali Tehsil Tehsil Sambhal Sambhal NVMBD1BPH210V01 NVMBD1BPH210V01 I-UW-SMBL-OSC-0049 I-UW-SMBL-ENB-0035 null 2405:200:112:A00:7:2:585:905 2405:200:112:A00:7:2:585:904 INUWSMBLXXXXTW0021ENBIB5001 INUWSMBLXXXXNB0004OSCIB5001 Sarai Tarren Sarai Tareen, Markaz Wali Masjid null null INUWSMBLXXXXNB0004 28.55181532 78.56489494 INUWSMBLXXXXTW0021 28.55394 78.56326 NNI-1 GigabitEthernet0/0/3 null null INUWSMBLXXXXTW0021ENBIB5001-INUWSMBLXXXXNB0004OSCIB5001
INJKJMMUGTKLNB6001_INJKJMMUGTKLNB0618_IB5_2 AIRSPAN JAMMU & KASHMIR JAMMU & KASHMIR Jammu Jammu Barian Barian Jammu Jammu Jammu Jammu NVMBD1BPH210V01 NVMBD1BPH210V01 I-JK-JMMU-ENB-6091 I-JK-JMMU-ENT-0072 null 2405:200:10F:200:7:2:585:486 2405:200:10F:200:7:2:585:487 INJKJMMUGTKLNB6001ENBIB5002 INJKJMMUGTKLNB0618ENTIB5002 SHAKTI NAGAR-3 (Greater Kailash) B D Security Private Limited null null INJKJMMUGTKLNB6001 32.66767 74.8951 INJKJMMUGTKLNB0618 32.67391151 74.8906778 GigabitEthernet0/0/6 null null null INJKJMMUGTKLNB6001ENBIB5002-INJKJMMUGTKLNB0618ENTIB5002
INJKJMMUGTKLNB6001_INJKJMMUGTKLNB0618_IB5_2 AIRSPAN JAMMU & KASHMIR JAMMU & KASHMIR Jammu Jammu Sainik Colony Barian Jammu Jammu Jammu Jammu NVMBD1BPH210V01 NVMBD1BPH210V01 I-JK-JMMU-OSC-0375 I-JK-JMMU-ENT-0072 null 2405:200:10F:200:7:2:585:485 2405:200:10F:200:7:2:585:487 INJKJMMUGTKLNB6001ENBIB5002 INJKJMMUGTKLNB0618ENTIB5002 Sainik Colony_0001 B D Security Private Limited null null INJKJMMUSNICNB0001 32.6719578 74.90042112 INJKJMMUGTKLNB0618 32.67391151 74.8906778 Ethernet 2 null null null INJKJMMUGTKLNB6001ENBIB5002-INJKJMMUGTKLNB0618ENTIB5002
INJKJMMUGTKLNB6001_INJKJMMUGTKLNB0618_IB5_2 AIRSPAN JAMMU & KASHMIR JAMMU & KASHMIR Jammu Jammu Barian Barian Jammu Jammu Jammu Jammu NVMBD1BPH210V01 NVMBD1BPH210V01 I-JK-JMMU-ENT-0072 I-JK-JMMU-ENB-6091 null 2405:200:10F:200:7:2:585:487 2405:200:10F:200:7:2:585:486 INJKJMMUGTKLNB6001ENBIB5002 INJKJMMUGTKLNB0618ENTIB5002 B D Security Private Limited SHAKTI NAGAR-3 (Greater Kailash) null null INJKJMMUGTKLNB0618 32.67391151 74.8906778 INJKJMMUGTKLNB6001 32.66767 74.8951 null GigabitEthernet0/0/6 null null INJKJMMUGTKLNB6001ENBIB5002-INJKJMMUGTKLNB0618ENTIB5002
INJKJMMUGTKLNB6001_INJKJMMUGTKLNB0618_IB5_2 AIRSPAN JAMMU & KASHMIR JAMMU & KASHMIR Jammu Jammu Barian Sainik Colony Jammu Jammu Jammu Jammu NVMBD1BPH210V01 NVMBD1BPH210V01 I-JK-JMMU-ENT-0072 I-JK-JMMU-OSC-0375 null 2405:200:10F:200:7:2:585:487 2405:200:10F:200:7:2:585:485 INJKJMMUGTKLNB6001ENBIB5002 INJKJMMUGTKLNB0618ENTIB5002 B D Security Private Limited Sainik Colony_0001 null null INJKJMMUGTKLNB0618 32.67391151 74.8906778 INJKJMMUSNICNB0001 32.6719578 74.90042112 null Ethernet 2 null null INJKJMMUGTKLNB6001ENBIB5002-INJKJMMUGTKLNB0618ENTIB5002

Expected file from Neo4j

VENDOR A_End_CircleName B_End_CircleName A_SITE_R4G_STATE B_SITE_R4G_STATE A_SITE_AREA_NAME B_SITE_AREA_NAME A_End_City Name B_End_City Name A_JIO_CENTER B_JIO_CENTER AEnd_EMS Name BEnd_EMS Name AEND_SAP_ID BEND_SAP_ID GWIP A_END_IPV6 B_END_IPV6 NEID_A NEID_B A_SITE_FRIENDLYNAME B_SITE_FRIENDLYNAME HOP_NAME Link Type A_PLANNED_RSL B_PLANNED_RSL A_POLARIZATION_HV B_POLARIZATION_HV A_SITE_LATITUDE A_SITE_LONGITUDE B_SITE_LATITUDE B_SITE_LONGITUDE Link Name PRODUCTNAME Service_Type A_PoE_Type B_PoE_Type Channel_BW_MHz A_TxPower_dBm B_TxPower_dBm Site_A_Freq Site_B_Freq A_Data_Port_No B_Data_Port_No A_RX_Level Z_Rx_Level A_Link_Distance Z_Link_Distance
AIRSPAN BIHAR BIHAR Bihar Bihar NA Kharik Jamunia Kharik Bhagalpur Bhagalpur NVMBD1BPH190D00 NVMBD1BPH190D00 I-BR-NGCH-ENB-6004 I-BR-KKRX-OSC-0002 2405:200:139:200:7:2:585:3383 2405:200:139:200:7:2:585:3384 2405:200:139:200:7:2:585:3385 INBRNGCHXXXXTW6002ENBIB5001 INBRKKRXXXXXNB0003OSCIB5001 "TULSIPUR" "Tulsipur" INBRNGCHXXXXTW6002ENBIB5001-INBRKKRXXXXXNB0003OSCIB5001 H+V H+V 25.36587 87.04401 25.36777487 87.03548551 I-BR-NGCH-ENB-6004-I-BR-KKRX-OSC-0002 AS-IB-440-UBR 20 0 0 5840 5840 GigabitEthernet0/0/3 Ethernet 1
AIRSPAN JAMMU & KASHMIR JAMMU & KASHMIR Jammu Jammu Barian Barian Jammu Jammu Jammu Jammu NVMBD1BPH190D00 NVMBD1BPH190D00 I-JK-JMMU-ENB-6091 I-JK-JMMU-ENT-0072 2405:200:10F:200:7:2:585:483 2405:200:10F:200:7:2:585:486 2405:200:10F:200:7:2:585:487 INJKJMMUGTKLNB6001ENBIB5002 INJKJMMUGTKLNB0618ENTIB5002 "SHAKTI NAGAR-3 (Greater Kailash)" "B D Security Private Limited" INJKJMMUGTKLNB6001ENBIB5002-INJKJMMUGTKLNB0618ENTIB5002 V+H V+H 32.66767 74.8951 32.67391151 74.8906778 I-JK-JMMU-ENB-6091-I-JK-JMMU-ENT-0072 AS-IB-440-UBR 20 10 10 5845 5845 GigabitEthernet0/0/6 -48 -48
AIRSPAN UTTAR PRADESH(EAST) UTTAR PRADESH(EAST) Uttar Pradesh (East) Uttar Pradesh (East) Nilmantha Malak Lucknow Lucknow Ashiyana Ashiyana NVMBD1BPH190D00 NVMBD1BPH190D00 I-UE-LCKN-ENB-I050 I-UE-LCKN-OSC-0606 2405:200:109:100:7:2:585:303 2405:200:109:100:7:2:585:304 2405:200:109:100:7:2:585:305 INUELCKNNLMTTW6002ENBIB5001 INUELCKNHRIPNB0001OSCIB5001 "Malak" "Dipty Ganj" INUELCKNNLMTTW6002ENBIB5001-INUELCKNHRIPNB0001OSCIB5001 26.78265 80.97418 26.78066061 80.97609632 I-UE-LCKN-ENB-I050-I-UE-LCKN-OSC-0606 AS-IB-440-UBR ge-0/0/3 NNI-1
AIRSPAN UTTAR PRADESH(WEST) UTTAR PRADESH(WEST) Uttar Pradesh (West) Uttar Pradesh (West) Chakali Panni Gram Usman Sari Sambhal (NPP) Sambhal Sambhal NVMBD1BPH190D00 NVMBD1BPH190D00 I-UW-SMBL-ENB-0035 I-UW-SMBL-OSC-0049 2405:200:112:A00:7:2:585:903 2405:200:112:A00:7:2:585:904 2405:200:112:A00:7:2:585:905 INUWSMBLXXXXTW0021ENBIB5001 INUWSMBLXXXXNB0004OSCIB5001 "Sarai Tareen, Markaz Wali Masjid" "Sarai Tarren" INUWSMBLXXXXTW0021ENBIB5001-INUWSMBLXXXXNB0004OSCIB5001 H+V H+V 28.55394 78.56326 28.55181532 78.56489494 I-UW-SMBL-ENB-0035-I-UW-SMBL-OSC-0049 AS-IB-440-UBR 20MHz 12 12 5840 5840 GigabitEthernet0/0/3 NNI-1

Below is the Neo4j Query i am using

MATCH p = (sa:SITE)-[rsa]-(ea:CONTAINER) –[ra*]-(n:PATH)-[rb*]-(eb:CONTAINER)-[rsb]-(sb:SITE) RETURN
ea.EQUIP_VENDOR as VENDOR,
sa.SITE_CIRCLE as A_End_CircleName,
sb.SITE_CIRCLE as B_End_CircleName,
sa.SITE_R4G_STATE as A_SITE_R4G_STATE,
sb.SITE_R4G_STATE as B_SITE_R4G_STATE,
sa.SITE_AREACODE as A_SITE_AREA_NAME,
sb.SITE_AREACODE as B_SITE_AREA_NAME,
sa.SITE_CITY as A_End_City_Name,
sb.SITE_CITY as B_End_City_Name,
sa.JIO_CENTER as A_JIO_CENTER,
sb.JIO_CENTER as B_JIO_CENTER,
ea.EQUIP_EMS_INSTANCENAME as AEnd_EMS_Name,
eb.EQUIP_EMS_INSTANCENAME as BEnd_EMS_Name,
ea.SAPID as AEND_SAP_ID,
eb.SAPID as BEND_SAP_ID,
ea.EQUIP_IPV6_DEFAULT_GATEWAY as GWIP,
ea.EQUIP_IPV6 as A_END_IPV6,
eb.EQUIP_IPV6 as B_END_IPV6,
n.PATH_ASIDE_EQUIPMENT as NEID_A,
n.PATH_ZSIDE_EQUIPMENT as NEID_B,
sa.SITE_FRIENDLY_NAME as A_SITE_FRIENDLYNAME,
sb.SITE_FRIENDLY_NAME as B_SITE_FRIENDLYNAME,
ea.EQUIP_POLARIZATION as A_POLARIZATION_HV,
eb.EQUIP_POLARIZATION as B_POLARIZATION_HV,
sa.SITE_NAME as A_SITE_NAME,
sa.SITE_LATITUDE as A_SITE_LATITUDE,
sa.SITE_LONGITUDE as A_SITE_LONGITUDE,
sb.SITE_NAME as B_SITE_NAME,
sb.SITE_LATITUDE as B_SITE_LATITUDE,
sb.SITE_LONGITUDE as B_SITE_LONGITUDE,
ea.EQUIP_DATA_PORT_NO as A_Data_Port_No,
eb.EQUIP_DATA_PORT_NO as B_Data_Port_No,
ea.EQUIP_RX_LEVEL as A_RX_Level,
eb.EQUIP_RX_LEVEL as B_Rx_Level,
n.PATH_ASIDE_EQUIPMENT+"-"+n.PATH_ZSIDE_EQUIPMENT as HOP_NAME LIMIT 10

screnshot of neo4 label and relationship in use

2X_c_c2fe5a07e777ba87c73876d039253a45f82aa0e0.png

Regards
Akshat