10

I have this update expression :

{
  "UpdateExpression": "SET #location = :location, #edited = :edited, #coordinates = :coordinates, #city = :city, #country = :country, #zipCode = :zipCode, #street = :street, coordinates = :coordinates",
  "ExpressionAttributeValues": {
    ":location": "Reston, VA",
    ":edited": true,
    ":coordinates": {
      "lat": 38.9586307,
      "lng": -77.35700279999999
    },
    ":city": "Reston",
    ":country": "US",
    ":zipCode": "20190",
    ":street": "11910 Market St"
  },
  "ExpressionAttributeNames": {
    "#location": "location",
    "#edited": "edited",
    "#coordinates": "coordinates",
    "#city": "city",
    "#country": "country",
    "#zipCode": "zipCode",
    "#street": "street"
  }
}

and I am getting this weird error

ERROR: ValidationException: Invalid UpdateExpression: Two document paths overlap with each other; must remove or rewrite one of these paths; path one: [coordinates], path two: [zipCode]

I couldn't find any information online and I can not see where the overlap. Any help will be appreciated.

super7egazi
  • 706
  • 1
  • 8
  • 22

1 Answers1

10

coordinates is effectively in your expression twice.

Jason Wadsworth
  • 8,059
  • 19
  • 32