amazon-web-servicesamazon-neptuneopencypher

Amazon Neptune OpenCypher - What is the cause for "Operation terminated (internal error)" when using SET after MERGE?


I am running this simple query on an Amazon Neptune DB, using directly the Neptune API:

POST {{host}}/openCypher
Content-Type: application/json

{
    "query":"MERGE (t:Test {reference: $reference}) SET t.test=$test RETURN t",
    "parameters": {
        "reference": "test",
        "test": "100"
    }
}

But I get the following error as a response:

  "detailedMessage": "Operation terminated (internal error)",
  "code": "InternalFailureException",
  "message": "Operation terminated (internal error)"

What gives?

I have tried other examples setting test to different values. All of them worked, which makes the problem even stranger. See these below:

{     
"query":"MERGE (t:Test {reference: $reference}) SET t.test=$test RETURN t",     
"parameters": {         
   "reference": "test",         
   "test": "1"     
} 
{     
"query":"MERGE (t:Test {reference: $reference}) SET t.test=$test RETURN t",     
"parameters": {         
   "reference": "test",         
   "test": true     
} 
{     
"query":"MERGE (t:Test {reference: $reference}) SET t.test=$test RETURN t",     
"parameters": {         
   "reference": "test",         
   "test": false    
} 
{     
"query":"MERGE (t:Test {reference: $reference}) SET t.test=$test RETURN t",     
"parameters": {         
   "reference": "test",         
   "test": 1    
} 
{     
"query":"MERGE (t:Test {reference: $reference}) SET t.test=$test RETURN t",     
"parameters": {         
   "reference": "test",         
   "test": 100     
} 
{     
"query":"MERGE (t:Test {reference: $reference}) SET t.test=$test RETURN t",     
"parameters": {         
   "reference": "test",         
   "test": "test"    
} 

Solution

  • This bug has been fixed in version 1.3.2.1 of the Neptune Engine -https://docs.aws.amazon.com/neptune/latest/userguide/engine-releases-1.3.2.1.html

    Fixed a bug where parameterized mutation queries throw an InternalFailureException when the parameter that was passed is not already present in the database.