我正在使用Datastax Cassandra3.0 使用cqlsh架构在cassandra中创建表时,更改列名正在按字母顺序排列。请参阅下文。
这是创建表时的结构..
cqlsh> CREATE TABLE tutorialspoint.SupplierItemData_input15(partnumber BIGINT PRIMARY KEY,
...供应商文本,
... monthyear varchar,
...分配int,
... evdate date,
... paymentterms int,
... actualdays int,
... percentageofpayment int,
... variation int,
... paymenttermsummary text,
... copq int,
... year int,
... month int,
...发布日期);
但是当我检查DESCRIBE TABLE NAME时,结构正在改变
cqlsh> DESCRIBE tutorialspoint.SupplierItemData_input15;
CREATE TABLE tutorialspoint.supplieritemdata_input15(
partnumber bigint PRIMARY KEY,
actualdays int,
分配int,
copq int,
evdate date,
月int,
monthyear text,
paymentterms int,
paymenttermsummary text,
percentofpayment int,
发布日期,
供应商文本,
变体int,
year int
)
WITH bloom_filter_fp_chance = 0.01
AND caching = {'keys':'ALL','rows_per_partition':'NONE'} AND comment ='' AND compaction = {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'} AND compression = {'chunk_length_in_kb':'64','class':'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.1 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair_chance = 0.0 AND speculative_retry = '99PERCENTILE';
请帮我解决这个问题。
三江源 拉维
答案 0 :(得分:0)
如果要从csv文件使用cqlsh COPY导入数据,则应将列名添加为csv文件顶部的标题。这样,默认情况下它们的顺序并不重要。