Update exiting data



I’m storing temperature sensor output which is an integer into KB. But, I get get frequent updates on that value. How can I update that property in KB?


What I’m trying to do in the python client is

def updateAttribute(thing, type, value):
    for attr in thing.keys(type):
    if value is None:
    if value == '':
    attribute = type.create(value)

“has” adds attributes (more than one of the same type can be added; entities can have 2 names, for instance)
I think “unhas” does the opposite. But I’m running into an issue with this: Error running unhas: RelationshipReified cannot be cast to Relationship . So I don’t know if I’m doing it right.

Also, I don’t think “unhas” exists in graql. I don’t know if updating is possible using only graql


I found another answer on the forum: How can I retrieve an instance and then update it with GRAQL?