Hi @jon.strabala,
I have an eventing function, where I need to run an N1ql query on different buckets based on the document value.
I was looking through your other answers(Bucket Name from Eventing service) and documentation, where it’s mentioned that we cant use bucket alias in the N1ql query.
But Is it possible to save the bucket name in a variable(tenantId) and use it in the N1Ql query?
var bucektName = doc.tenantId ;
var instanceData = SELECT instance FROM $bucketName as instance WHERE instance.id = "123"
or anything else could be done here to just make the bucket name dynamic based on the document values??
Thanks,