0

I currently have a series of two vertices in a parent/child relationship, two edges between them that I have no issue with.

The issue happens when I start attempting to add properties to the edge and I get an error message that gives only some help:

{
    "requestId": "...",
    "code": "InternalFailureException",
    "detailedMessage": "null:to([[SelectOneStep(last,child)]])"
}

I can run the same pattern below on Gremlify, but I understand that is 3.5 as opposed to Neptune on 3.4.

Do I need to point back to the edge itself after adding in all the properties or am I supposed to specify to(select('child')) and then add all the properties while in scope (and then return back to child)?

Traversal Query:

g.V(13695)
    .out("latest_parent_to").as("child")
    .in("parent_to")
    .addE("role")
        .property(single,'name','some_role')
    .to(
        select("child")    
    ).select("child")

Update: I made a few changes to try the other thought: addE > to(select(...)) > set properties. Different error this time:

{
    "requestId": "77ee2b5b-8309-4226-b163-8b253450c721",
    "code": "UnsupportedOperationException",
    "detailedMessage": "Cardinality specification may not be used with Edge properties."
}

The reason for using the single cardinality is every property stored/returned as a set. This was to prevent accidentally appending when one should update.

  • At face value your query looks fine. Is it possible that `g.V(13695) .out("latest_parent_to").as("child")` is not actually yielding any results? – Kelvin Lawrence Jan 05 '22 at 16:11
  • @Kelvin I know that this record exists in the neptune instance. That is just the ID from my Gremlify testing. – Joe Kennedy Jan 05 '22 at 16:12
  • OK thanks for clarifying. I used essentially your query on one of my Neptune graphs and it worked fine. The `null` in the error message leads me to believe that something in the query failed to yield a result but I cannot as yet explain it. – Kelvin Lawrence Jan 05 '22 at 16:36
  • @Kelvin Updating my question as I did try something different and got a very different error message. Might change some thought. – Joe Kennedy Jan 05 '22 at 17:03
  • Can you try removing the cardinality argument as the Edge properties are single cardinality always by default. – PrashantUpadhyay Jan 05 '22 at 17:28
  • That did make it work, but it appears that the same property cannot be altered. – Joe Kennedy Jan 05 '22 at 20:34
  • A property should always be modifiable. Can you please update the question with the exact query being run as I am not able to reproduce any of these issues? Also which Neptune engine version are you running? – Kelvin Lawrence Jan 05 '22 at 22:20

0 Answers0