我可以在Cassandra中插入嵌套值但是无法从CSV文件导入

时间:2017-01-21 02:49:07

标签: cassandra cql

我在Cassandra有这张桌子:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x167f4beb8. 
/usr/lib/libobjc.A.dylib objc_msgSend
Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:]
Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:]
Frameworks/Foundation.framework/Foundation -[NSOperationQueue setMaxConcurrentOperationCount:]
GreatJonesStreet-Prod mh_execute_header
GreatJonesStreet-Prod mh_execute_header
GreatJonesStreet-Prod mh_execute_header
/usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
/usr/lib/system/libdispatch.dylib __dispatch_client_callout
/usr/lib/system/libdispatch.dylib __dispatch_queue_override_invoke
/usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain
/usr/lib/system/libdispatch.dylib __dispatch_worker_thread3
/usr/lib/system/libsystem_pthread.dylib __pthread_wqthread

我可以毫无问题地插入数据:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0xa8a94beb8. 
/usr/lib/libobjc.A.dylib objc_msgSend
Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:]
Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:]
Frameworks/Foundation.framework/Foundation -[NSOperationQueue setMaxConcurrentOperationCount:]
GreatJonesStreet mh_execute_header
GreatJonesStreet mh_execute_header
GreatJonesStreet mh_execute_header
/usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
/usr/lib/system/libdispatch.dylib __dispatch_client_callout
/usr/lib/system/libdispatch.dylib __dispatch_queue_override_invoke
/usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain
/usr/lib/system/libdispatch.dylib __dispatch_worker_thread3
/usr/lib/system/libsystem_pthread.dylib __pthread_wqthread

如果我将带有COPY footbastatsleague的数据导出到'path / football.csv';我明白了:

CREATE TABLE footbaStatsleague (
     league int PRIMARY KEY,
     hometeam text,
     homegoal int,
     homegoalsplayer frozen<map<text,list<int>>>,
     awayteam text,
     awaygoals int,
     awaygoalsplayer frozen<map<text,list<int>>>,
     dategame timestamp,matchweek text
) WITH comment='Contains stats for europe football';

但是如果我尝试使用之前导出的相同格式导入FROM CSV文件,我在cql shell中收到此错误:

  

无法导入1行:ParseError - 无法解析{'Andr Schrrle':   [52,65,68]}:不可用类型:'list',在没有重试的情况下放弃   无法处理1行;写入失败的行   import_footballstatistics_footbastatsleague.err

我需要从CSV导入而不是逐行插入。

0 个答案:

没有答案