Skip to content

Nested json output from neptune-export is not a valid json #195

Description

@triggan

Moving this issue here from the older neptune tools repo: awslabs/amazon-neptune-tools#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. 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}"]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions