Search code examples
google-cloud-platformgoogle-cloud-spanner

Invalid value for column : Expected INT64


Table "mytable" has only one column named "mycolumn" and is of type INT64. When I send the following request, it always fails with the error "Invalid value for column mycolumn in table mytable: Expected INT64.". I tried my best but could not find the reason for the failure. Could someone help me pointing out the issue with this request?

{  
   "session":"projects/*************/instances/my-instance/databases/*******/sessions/*************-********",
   "singleUseTransaction":{  
      "readWrite":{  

      }
   },
   "mutations":[  
      {  
         "insert":{  
            "table":"mytable",
            "columns":[  
               "mycolumn"
            ],
            "values":[  
               [  
                  99
               ],
               [  
                  97
               ]
            ]
         }
      }
   ]
}

Solution

  • I think the values need to be strings. Try "99" and "97".