Upsert issue on 3.0.0

Hi, I’m having trouble migrating upserts from 2.6.0 to 3.0.0. An upsert that works fine on 2.6.0 is somehow ineffective in actually adding data to the graph in 3.0.0, even though no error is returned. Here is sample code, first on 3.0.0, then on 2.6.0:

(base) benamiy64003:EasyAsPie.ai ybenami$ curl -X POST -H "Authorization: Bearer redacted" -d '{"vertices": {"ML_condition": {"Female": {"condition_id": {"value": "Female"}, "mean": {"value": 0}, "std": {"value": 0}, "p_value": {"value": 0}, "adj_p_value": {"value": 0}}}}}' "http://67.205.191.70:9000/graph/ML"
{"version":{"edition":"enterprise","api":"v2","schema":44},"error":false,"message":"","results":[{"accepted_vertices":1,"accepted_edges":0}],"code":"REST-0001"}
(base) benamiy64003:EasyAsPie.ai ybenami$ curl -X GET -H "Authorization: Bearer redacted" "http://67.205.191.70:9000/graph/ML/vertices/ML_condition"
{"version":{"edition":"enterprise","api":"v2","schema":44},"error":false,"message":"","results":[]}
(base) benamiy64003:EasyAsPie.ai ybenami$ curl -X POST -H "Authorization: Bearer redacted" -d '{"vertices": {"ML_condition": {"Female": {"condition_id": {"value": "Female"}, "mean": {"value": 0}, "std": {"value": 0}, "p_value": {"value": 0}, "adj_p_value": {"value": 0}}}}}' "https://yaniv.i.tgcloud.io:9000/graph/ML"
{"version":{"edition":"enterprise","api":"v2","schema":30},"error":false,"message":"","results":[{"accepted_vertices":1,"accepted_edges":0}],"code":"REST-0001"}
(base) benamiy64003:EasyAsPie.ai ybenami$ curl -X GET -H "Authorization: Bearer redacted" "https://yaniv.i.tgcloud.io:9000/graph/ML/vertices/ML_condition"
{"version":{"edition":"enterprise","api":"v2","schema":30},"error":false,"message":"","results":[{"v_id":"Female","v_type":"ML_condition","attributes":{"condition_id":"Female","mean":0,"std":0,"p_value":0,"adj_p_value":0}}]}```
1 Like

Yaniv,
This is the response, right?
I don’t see the request, with the endpoint URL. Could you send that too, to be complete?

1 Like

Also, I’m assuming that you verified that your particular upsert should actually have a visible effect? E.g., writing the data that was already there will have no effect.

These are curl requests + responses. The first and second requests are on a 3.0.0 server. The second request shows that the data was not populated into the graph. The third and fourth request repeat the same curl requests on a 2.6.0 server. The fourth request shows that this time it worked.

Can you post DDL so that we can reproduce?

We have tried another schema, The Post/Get -H -d function works well on both 2.6.0 and 3.0

Here is the schema:

    create vertex ML_condition(primary_id condition_id string, mean double, std double, p_value double, adj_p_value double) WITH PRIMARY_ID_AS_ATTRIBUTE="true"
    create directed edge ML_reg_coef(from ML_condition, to ML_condition, x string, y string, mean double, std double, p_value double, adj_p_value double) 
    
    create graph ML (ML_condition, ML_reg_coef)

Can you check the graph whether the vertex data has post successfully after you executing the Post command? We want to further confirm which process Post/Get have problem. You can check it by using query " select * from ML_condition limit 10". We have tested your schema in single node and cluster-3. Both Post/Get -H -d function works well on 2.6.0 and 3.0.0. Thanks.

1 Like

Could you execute the command " gadmin version" on the user installed tigergraph and post the information ?

1 Like