Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
537 views
in Technique[技术] by (71.8m points)

copy one table to another in cassandra

i want to copy data from standardevents to standardeventstemp.. below steps i am doing

COPY events.standardevents (uuid, data, name, time, tracker, type, userid) TO 'temp.csv'; 

truncate standardevents;

COPY event.standardeventstemp (uuid, data, name, time, tracker, type, userid) FROM 'temp.csv';

but i am getting below error after 3rd step

Bad Request: Invalid STRING constant (3a1ccec0-ef77-11e3-9e56-22000ae3163a) for name of type uuid

aborting import at column #0, previously inserted values are still present.

can anybody explain the cause of this error and how can i resolve this

datatype of uuid is uuid the rest of the datatypes are varchar

CREATE TABLE standardevents (
  uuid uuid PRIMARY KEY,
  data text,
  name text,
  time text,
  tracker text,
  type text,
  userid text
) WITH
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.100000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'SnappyCompressor'};
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It turned out that this is a known bug in Cassandra 1.2.2.

The same commands work fine in 2.0.x, so an upgrade will fix the problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...