cluster.n1ql_query(SELECT * FROM bucket WHERE column1 = “1” )
this retrieves the data from couchbase bucket
but instead of giving the value manually, I’ll store the value “1” in the list named “A”, now how can I use this list “A” in n1ql query to retrieve the data from couchbase bucket
Hi @vsr1 ,
I don’t want to give values manually, instead saved that value “1” in a list named “A” and I want to use that list “A” to retrieve data, hope I’m clear.
I want the query in below format
cluster.n1ql_query(‘SELECT * FROM bucket WHERE column1 IN [“A”]’ )
Hi @vsr1 sir, I think I was not clear with what I wanted.
In an excel sheet there is column with name “column1” having the column values “1”, so in-order to check if records are matched with the bucket I’m retrieving the data from a couchbase bucket with name “bucket” by using the query
cluster.n1ql_query(SELECT * FROM bucket WHERE column1 = “1” )
now I don’t want to give manual column value of “column1” so I stored the column values of “column1” of excel sheet in a list using
A = df[“column1”].unique().tolist()
(here “A” will have only one distinct value that is “1”)
now what query should I use in order to get all documents from couchbase bucket with name “bucket” having the value of “column1” = “1” using the variable instead of manually giving the value as “1”.