2

I'm using GridDB CE v5.0 with the Python client (griddb_python) to manage time-series sensor data.

My container schema is:

[
    ("timestamp", griddb.Type.TIMESTAMP),
    ("device_id", griddb.Type.STRING),
    ("temperature", griddb.Type.FLOAT),
    ("voltage", griddb.Type.FLOAT),
    ("status", griddb.Type.BOOL)
]

I want to update only the status column for a particular timestamp (i.e., primary key), without modifying other columns.

Use Case:

In my application, a background process updates only the status field (e.g., alarm triggered or not) based on new logic. However, temperature and voltage fields are written by a different process and I want to avoid overwriting those inadvertently.

What I’ve tried:

row = container.get(row_key)  # row_key = timestamp
row[4] = True  # update status
container.put(row)  # overwrite full row

This works but:

  • It requires pulling the full row.

  • I'm concerned it may race with other writes.

Question

Is there a way in GridDB Python API to perform an in-place partial update (e.g., update status only) without re-sending the entire row? I don't want to send my entire row every time.

1 Answer 1

-1

In GridDB, TimeSeries containers do not support updating individual columns directly. To update a specific field, you must read the entire row for the given timestamp, modify the desired column, and write the full row back using put(). Partial updates are not allowed. This ensures the entire row is replaced atomically. If needed, you can use a transaction to make the read-modify-write operation safe from concurrency issues.

Sign up to request clarification or add additional context in comments.

1 Comment

Do you have a reference for this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.