【发布时间】:2021-11-27 07:04:19
【问题描述】:
我有一个存储桶“A”,范围为“B”,集合“C”。如何从 couchbase 中检索此集合中的所有文档?
import pandas as pd
from couchbase_core.cluster import PasswordAuthenticator
from couchbase.cluster import Cluster, ClusterOptions, QueryOptions
cluster = Cluster('couchbase://localhost', ClusterOptions(PasswordAuthenticator('xxx', 'xxx')))
cb = cluster.bucket("A")
cb_coll = cb.scope("B").collection("C")
如何使用 python 从这个集合“C”中提取所有文档并将其保存到数据框中?
【问题讨论】: