在Cassandra

时间:2015-10-14 12:13:40

标签: cassandra python-import keyerror

我正在使用Cassandra 2.2,我创建了表格' teste':

  

CREATE TABLE teste(      idflight UUID,      unique_carrier文本,      taiNumber文字,      airTime int,      depDelay int,      PRIMARY KEY(unique_carrier,depDelay,idflight)      );

然后我尝试使用COPY FROM命令从CSV文件导入数据:

  

COPY teste(idflight,unique_carrier,tailNumber,airTime,depDelay)FROM' out.csv' WITH HEADER = true AND DELIMITER =',';

运行此命令时会出现以下错误:



Process ImportProcess-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/bin/cqlsh.py", line 2306, in run
    cqltypes = [table_meta.columns[name].typestring for name in self.columns]
KeyError: 'tailnumber'
Process ImportProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/bin/cqlsh.py", line 2306, in run
    cqltypes = [table_meta.columns[name].typestring for name in self.columns]
KeyError: 'tailnumber'
Process ImportProcess-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/bin/cqlsh.py", line 2306, in run
    cqltypes = [table_meta.columns[name].typestring for name in self.columns]
KeyError: 'tailnumber'




我该怎么做才能解决这个问题?

0 个答案:

没有答案