Hey team, is there a method that will return a SQL...
# general
j
Hey team, is there a method that will return a SQL statement as a String from a org.apache.pinot.common.request.BrokerRequest object?
k
I dont think we have that.. why do you need that feature? we can probably add it if the use case is compelling
j
I have a use case to host the data for multiple clients in single tables, where each table is has a discriminator column per client. I’ll like to be able to augment a SQL statement (before it is set to Pinot) to automatically append a filter predicate based the discriminator column. I’m looking to take as input a SQL statement as a string (outside of Pinot), convert it into a BrokerRequest/PinotQuery or QueryContext object where I can augment it. After augmenting it, turn the BrokerRequest/PinotQuery or QueryContext object back into a SQL string and then submit it to Pinot.
k
Got it. This is something thats come up multiple times in case of multi-tenancy. @User @User @User what would be a good way to support this? the suggestion from @User might work but it will create dependency on some internal jars of Pinot which adds maintenance overhead.. may be, we can take additional params via rest api or query options and automatically append the additional predicate in the query?
m
Yeah, tenant isolation comes up quite often. To me it feels like something that belongs on a layer of abstraction on top of Pinot. Unless we build row level access control as a primitive in Pinot?
The way I see it, adding the predicate is first step, which can evolve into adding authenticaiton/authorization support as well.
k
Let’s create a GitHub issue and continue the discussion there
m
I think we might have one. Let me find and link here.
j
Thanks guys