Nested json output from neptune-export is not a valid json
- Dominant language
- Java
- Stars
- 17
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Moving this issue here from the older neptune tools repo: https://github.com/awslabs/amazon-neptune-tools/issues/207
> I'm trying to export a fairly complex query which has all node and edge properties. The output from the neptune-export service is a json, but it seems like the nested data is not a valid json. Instead, it is separated by "=" instead of ":". [Example here](https://justpaste.it/7mxi2/pdf). Is this something that can be addressed?
I was able to recreate this issue with the following `export-pg-from-queries` command:
```
➜ neptune-export git:(develop) ✗ java -jar neptune-export-2.0.2-all.jar export-pg-from-queries \
-e "neptunedbcluster-xxxxxxxxxx.cluster-xxxxxxxxxx.us-west-2.neptune.amazonaws.com" \
-q "g.V().has('name','Kevin Bacon').project('node','edge_details').by(valueMap(true).fold()).by(bothE().valueMap(true).fold())" \
-o stdout -d ./ --region us-west-2 --use-iam-auth --format json
```
Returns the output formatted as:
```
{"node":["{label=Artist, birthYear=[1958], id=nm0000102, name=[Kevin Bacon], newprop=[new]}"],
"edge_details":[
"{label=actor, id=tt0112453-actor-nm0000102}",
"{label=actor, id=tt0099582-actor-nm0000102}",
"{label=actor, id=tt1878841-actor-nm0000102}",
"{label=actor, id=tt0373450-actor-nm0000102}",
....]}
{"node":["{label=Artist, id=nm9323132, name=[Kevin Bacon], newprop=[new]}"],
"edge_details":["{label=actor, id=tt7470112-actor-nm9323132}"]}
```
Contributor guide
Research direction
Start with the export-pg-from-queries command and its --format json output path in the neptune-export service. Reproduce the query shown and inspect how nested node and edge properties are serialized. Done means the nested output is valid JSON, using colons rather than equals signs, and can be parsed successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100