scyllapy icon indicating copy to clipboard operation
scyllapy copied to clipboard

I cannot run a UNLOGGED batch

Open cecedille1 opened this issue 9 months ago • 0 comments

I try to execute a batch on a AWS Keyspace with scyllapy==1.3.3, but it fails because LOGGED batches are not supported on Keyspace. When I change the batch's type it does not work better.

from scyllapy import Scylla, InlineBatch, BatchType, Batch
sess = Scylla(['cassandra'])
await sess.startup()

batch  = InlineBatch(batch_type=BatchType.UNLOGGED)
batch.add_query('INSERT INTO spam (name, context) VALUES (?,?) ', ['foo', {'bar'}])
await sess.batch(batch

ScyllaPyDBError: Database returned an error: The query is syntactically correct but invalid, Error message: Only UNLOGGED Batches are supported at this time.

cecedille1 avatar Apr 07 '25 15:04 cecedille1