Update multiple properties in a node

Hi,
I have the following query to update a node by id:

CYPHER 
   AccountUrl='https://instagram.com/testKK' 
   UserName='testkk' 
   WebProfile='INSTAGRAM' 
   Id=6205

MATCH(a:Source) where id(a)=$Id SET a.AccountUrl=$AccountUrl ,  a.WebProfile=$WebProfile , a.UserName=$UserName return a

The node after the update is:

id:6205
OtherUrls:https://instagram.com/0.867919
Source:10
SecondaryUserName:
AppId:10
Name:testName
AccountUrl:INSTAGRAM
UserName:testkk`

The AccountUrl was set with the wrong value
The WebProfile was not set at all

What am I missing?

Thanks

Hi @avi
this is what I’m getting when running against our edge docker image:

127.0.0.1:6379> FLUSHALL
OK
127.0.0.1:6379> GRAPH.QUERY g "CREATE(a:Source {OtherUrls:'https://instagram.com/0.867919', Source:10, AppId:10, Name:'testName', AccountUrl:'INSTAGRAM', UserName:'testkk'})"
1) 1) "Labels added: 1"
   2) "Nodes created: 1"
   3) "Properties set: 6"
   4) "Cached execution: 0"
   5) "Query internal execution time: 0.435700 milliseconds"
127.0.0.1:6379> GRAPH.QUERY g "CYPHER AccountUrl='https://instagram.com/testKK' UserName='testkk' WebProfile='INSTAGRAM' Id=0 MATCH(a:Source) where id(a)=$Id SET a.AccountUrl=$AccountUrl ,  a.WebProfile=$WebProfile , a.UserName=$UserName return a"
1) 1) "a"
2) 1) 1) 1) 1) "id"
            2) (integer) 0
         2) 1) "labels"
            2) 1) "Source"
         3) 1) "properties"
            2) 1) 1) "OtherUrls"
                  2) "https://instagram.com/0.867919"
               2) 1) "Source"
                  2) (integer) 10
               3) 1) "AppId"
                  2) (integer) 10
               4) 1) "Name"
                  2) "testName"
               5) 1) "AccountUrl"
                  2) "https://instagram.com/testKK"
               6) 1) "UserName"
                  2) "testkk"
               7) 1) "WebProfile"
                  2) "INSTAGRAM"
3) 1) "Properties set: 2"
   2) "Cached execution: 0"
   3) "Query internal execution time: 1.505400 milliseconds"
127.0.0.1:6379>

As you can see AccountUrl been updated, UserName wasn’t set as its value didn’t change, WebProfile was set to INSTAGRAM as it’s a new attribute

Would you mind testing this via redis-cli ?

Attached:

1) "Results"
2) "    Project"
3) "        Update"
4) "            Node By Label and ID Scan | (a:Source)"

I’m expecting to see:

127.0.0.1:6379> GRAPH.explain g "CYPHER AccountUrl='https://instagram.com/testKK' UserName='testkk' WebProfile='INSTAGRAM' Id=0 MATCH(a:Source) where id(a)=$Id SET a.AccountUrl=$AccountUrl ,  a.WebProfile=$WebProfile , a.UserName=$UserName return a"
1) "Results"
2) "    Project"
3) "        Update"
4) "            Node By Label and ID Scan | (a:Source)"
127.0.0.1:6379>

can you please try replacing: where id(a)=$Id with where id(a)= 6205

>> GRAPH.EXPLAIN redisgraph "CYPHER AccountUrl='https://instagram.com/testKK' UserName='testkk' WebProfile='INSTAGRAM'  MATCH(a:Source) where id(a)=6205 SET a.AccountUrl=$AccountUrl ,  a.WebProfile=$WebProfile , a.UserName=$UserName return a"

1) "Results"
2) "    Project"
3) "        Update"
4) "            Node By Label and ID Scan | (a:Source)"
>> GRAPH.QUERY redisgraph "CYPHER AccountUrl='https://instagram.com/testKK' UserName='testkk' WebProfile='INSTAGRAM'  MATCH(a:Source) where id(a)=6205 SET a.AccountUrl=$AccountUrl ,  a.WebProfile=$WebProfile , a.UserName=$UserName return a"

1) 1) "a"
2) 1) 1) 1) 1) "id"
            2) (integer) 6205
         2) 1) "labels"
            2) 1) "Source"
         3) 1) "properties"
            2) 1) 1) "OtherUrls"
                  2) "[https://instagram.com/0.513120]"
               2) 1) "Source"
                  2) "10"
               3) 1) "SecondaryUserName"
                  2) ""
               4) 1) "AppId"
                  2) (integer) 10
               5) 1) "Name"
                  2) "jkhjkhjkh"
               6) 1) "AccountUrl"
                  2) "INSTAGRAM"
               7) 1) "UserName"
                  2) "testkk"
3) 1) "Properties set: 3"
   2) "Cached execution: 0"
   3) "Query internal execution time: 0.589837 milliseconds"

Sorry I’ve miss read your execution-plan it looks fine: Node By Label and ID Scan | (a:Source)
can you please run: docker system prune -a to clear local docker and retry ?

Im using redislabs/redisgraph:2.2.6 I dont have intentions to upgrade in the next month or so, is that mandatory?

For starters let’s see if you see the problem on our edge image.

Seems to be working…
Must I upgrade?
Thanks


1) 1) "a"
2) 1) 1) 1) 1) "id"
            2) (integer) 6205
         2) 1) "labels"
            2) 1) "Source"
         3) 1) "properties"
            2) 1) 1) "OtherUrls"
                  2) "https://instagram.com/0.867919"
               2) 1) "Source"
                  2) (integer) 10
               3) 1) "AppId"
                  2) (integer) 10
               4) 1) "Name"
                  2) "testName"
               5) 1) "AccountUrl"
                  2) "https://instagram.com/testKK"
               6) 1) "UserName"
                  2) "testkk"
               7) 1) "WebProfile"
                  2) "INSTAGRAM"
3) 1) "Cached execution: 1"
   2) "Query internal execution time: 0.312240 milliseconds"

I would say yes, 2.2 is quite old, try moving to 2.4