Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In 4.4.0.16, apoc.export.json.query does not export Edge properties unless writeNodeProperties:true #3826

Open
abhsinh2 opened this issue Nov 4, 2023 · 0 comments

Comments

@abhsinh2
Copy link

abhsinh2 commented Nov 4, 2023

Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests. If you have questions on how to use APOC, please ask on the Neo4j Discussion Forum instead of creating an issue here.

Expected Behavior (Mandatory)

Need to export relationship with properties BUT without node properties using apoc.export.json.query.

in 4.4.0.6:
Query:
CALL apoc.export.json.query("MATCH (n)-[r:vmanagedbDEVICE]->(m) return r, n._rid as nid, m._rid as mid", "/Users/abhsinh2/4_4_0_6.json",{writeNodeProperties:false}) YIELD file, nodes, relationships, properties, time, done RETURN file, nodes, relationships, properties, time, done;

Output:
{"r":{"id":"9","type":"relationship","label":"vmanagedbDEVICE","properties":{"_rid":"0:Device:1680771843153:10","linkKey":"28a910ba-79a1-47c8-8413-80fbe8c7e46e"},"start":{"id":"115","labels":["vmanagedbDEVICENODE"]},"end":{"id":"112","labels":["vmanagedbSYSTEMDEVICESNODE"]}},"nid":"0:DeviceNode:1680771842511:116","mid":"0:SystemDevicesNode:1680771841881:113"}

In 4.4.0.16:
Query: CALL apoc.export.json.query("MATCH (n)-[r:vmanagedbDEVICE]->(m) return r, n._rid as nid, m._rid as mid", "/Users/abhsinh2/4_4_0_16.json",{writeNodeProperties:false}) YIELD file, nodes, relationships, properties, time, done RETURN file, nodes, relationships, properties, time, done;

Output:
{"r":{"type":"relationship","id":"32811","label":"vmanagedbDEVICE","start":{"id":"0","labels":["vmanagedbDEVICENODE"]},"end":{"id":"22242","labels":["vmanagedbSYSTEMDEVICESNODE"]}},"nid":"0:DeviceNode:1665724710793:28","mid":"0:SystemDevicesNode:1665726581704:21969"}

In output of 4.4.0.6, properties of relationship is exported without start and end node properties. Same query is executed on 4.4.0.16, relationship properties are missing.

Actual Behavior (Mandatory)

For apoc.export.json.query, we need to two options, withNodeProperties and withRelationshipProperties

How to Reproduce the Problem

Simple Dataset (where it's possibile)

CALL apoc.export.json.query("MATCH (n)-[r:vmanagedbDEVICE]->(m) return r, n._rid as nid, m._rid as mid", "/Users/abhsinh2/4_4_0_16.json",{writeNodeProperties:false}) YIELD file, nodes, relationships, properties, time, done RETURN file, nodes, relationships, properties, time, done;

Steps (Mandatory)

  1. Execute above query and look for relationship properties.

Screenshots (where it's possibile)

Specifications (Mandatory)

Neo4j 4.4.5 and apoc 4.4.0.16

Currently used versions

Versions

  • OS: Mac
  • Neo4j: 4.4.5
  • Neo4j-Apoc: 4.4.0.16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant