Why does GridDB Cloud Python client throw GSException: invalid RowKey when inserting rows with explicit UUID keys?
1
vote
0
answers
4
views
I’m testing **GridDB Cloud with the Python client** (griddb_python) and want to use UUIDs as row keys instead of integers or strings.
**Schema:**
import griddb_python as griddb
import uuid, datetime
factory = griddb.StoreFactory.get_instance()
store = factory.get_store(
notification_member="...",
cluster_name="...",
user="...",
password="..."
)
cols = [
("id", griddb.Type.STRING), # intended for UUID string
("ts", griddb.Type.TIMESTAMP),
("value", griddb.Type.FLOAT)
]
container = store.put_container("uuid_test", cols, True) # true = rowkey
**Insert attempt:**
row = (str(uuid.uuid4()), datetime.datetime.utcnow(), 42.5)
container.put(row)
**Error**:
[GSException] (errorCode=0x7d010001, message=RowKey value is invalid)
If I switch the row key to a plain string like "sensor_1", it works fine.
**Question:**
Are there restrictions on **row key formats in GridDB Cloud** (e.g., length, character set, UUID format)? If UUIDs aren’t allowed directly, what’s the recommended workaround store them as a secondary column with an index, or encode them differently before inserting?
**What I’ve checked:**
- GridDB docs state row keys can be STRING, INTEGER, or TIMESTAMP, but don’t clarify format restrictions on string keys.
- Tried both Python uuid.uuid4() and hex string version (uuid.uuid4().hex) — same error.
- Java client test with the same schema also rejects UUIDs as row keys.
Asked by VIK
(41 rep)
Sep 20, 2025, 06:37 AM