Cassandra大型python查询

2024-06-25 22:58:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用python驱动程序来获取一些时间序列数据。我想把数据放在一个numpy数组中。在

所以问题是把我得到的pagedResult转换成numpy数组。 目前我只做for row in result: out.append(row.price)。这是非常缓慢的,因为分页。我试着用statement = SimpleStatement(select_query, fetch_size=10**6)但是我得到了

cassandra.ReadTimeout: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'data_retrieved': False, 'required_responses': 1, 'consistency': 1}```

我如何快速阅读大约10^7行,并将它们放入numpy中?在


Tags: 数据innumpyfor驱动程序时间序列数组