使用 python/thrift 接口我试图插入一个 SuperColumn 就像WTF 中的 Comments 示例是一个 Supercolumn..
我已经创建了 SuperColumn 并发现我应该使用 batch_mutate 来插入它。但我不知道如何创建 Mutation 并设置密钥和 SuperColumn 类型
keyspace = "Keyspace1"
col1 = Column(name = "commenter", value = "J Doe", timestamp = time.time())
col2 = Column(name = "email", value = "jdoe@example.com", timestamp = time.time())
sc = SuperColumn(name = str(uuid.uuidl()), [col1, col2])
# i am guessing the missing code goes here
mutation = Mutation(column_or_supercolumn = sc?)
client.batch_mutate(keyspace, mutation, ConsistencyLevel.ZERO)