当我尝试使用以下命令将表复制到 cassandra 时:
copy images from 'images.csv'
我收到错误:
'PicklingError: Can't pickle <class 'cqlshlib.copyutil.ImmutableDict'>: attribute lookup cqlshlib.copyutil.ImmutableDict failed'
我已成功导入所有其他表,但这个表不起作用。与此唯一的区别是它包含图像的大型二进制 blob。
以下是 csv 文件中的示例行:
b267ba01-5420-4be5-b962-7e563dc245b0,,0x89504e...[large binary blob]...426082,0,7e700538-cce3-495f-bfd2-6a4fa968bdf6,pentium_e6600,01fa819e-3425-47ca-82aa-a3eec319a998,0,7e700538-cce3-495f-bfd2-6a4fa968bdf6,,,png,0
这是导致错误的文件:https://www.dropbox.com/s/5mrl6nuwelpf3lz/images.csv?dl=0
这是我的架构:
CREATE TABLE dealtech.images (
id uuid PRIMARY KEY,
attributes map<text, text>,
data blob,
height int,
item_id uuid,
name text,
product_id uuid,
scale double,
seller_id uuid,
text_bottom int,
text_top int,
type text,
width int
)
这些表是使用导出的cassandra 2.x
我目前正在使用cassandra 3.0.9
导入它们。