Trying to fetch whole bucket

I’m trying to simple fetch on a bucket,
where later on i do selective copy (on the fly).

U tried the following:

result = cluster_cb_047.query("SELECT * FROM  `table_name` " )
 for row in result:


Is there a simple way fetching the full bucket without using of query?

    cb = cluster_cb_047.bucket(buckt_name)
    cb_coll = cb.default_collection()
 # Couldn't extract the data in this way

The idea in general is to read bucket on source DB
and while iterating on the json → insert to target DB.

I can’t use xdcr or cbq commands.

Hi @BgOKcomp there isn’t really a way to do this without using query from the SDK. There is no KV operation to get all of the data in a bucket. Would the UPSERT query command help you out here? Taken from UPSERT | Couchbase Docs is

UPSERT INTO `travel-sample` (KEY foo, VALUE bar)
SELECT foo, bar FROM `beer-sample`

So you could do any filtering via N1QL if that’s an option?