【发布时间】:2021-08-25 10:13:14
【问题描述】:
我通过以下方式连接到远程 Cassandra DB:
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
from cassandra.query import dict_factory
cluster = Cluster(contact_points=[CASSANDRA_HOST], username='1',password='123')
session=cluster.connect()
然后,我想获取 Cassandra 中已经存在的键空间、表、列的列表。在 cqlsh 中,它与 describe keyspace 一起使用。我如何在 Python 中做到这一点?
【问题讨论】: