我是cassandra的新手,我需要在cassandra的表格中插入数据。我有下表。
Create TABLE test.EVENT(
Id int PRIMARY KEY,
Event_data text
);
我试图按如下方式插入数据。
INSERT INTO test.EVENT(Id, EVENT_DATA) VALUES (1,"<note> </note>");
但我总是得到这样的错误。
Traceback (most recent call last):
File "C:\Program Files\cassandra\bin\\cqlsh.py", line
847, in get_input_line
self.lastcmd = raw_input(prompt).decode(self.encoding)
File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 56:
invalid start byte
WARNING: console codepage must be set to cp65001 to support utf-8 encoding
on Windows platforms.
If you experience encoding problems, change your console codepage with 'chcp
65001' before starting cqlsh.
在Cassandra中插入XML数据的正确方法是什么?我的表结构错了吗?或者我是以错误的方式插入数据?