Find answers from the community

Updated 2 months ago

I'm using SQLTableRetrieverQueryEngine

I'm using SQLTableRetrieverQueryEngine and I'm trying to figure out how to filter the results. For example, a user might ask "which records are older than 30 days" but what I really want is to only query that user's records, not all users records. Is there a way to filter the results like this in text to SQL?
L
A
3 comments
I've been meaning to add some kind of "sql_query_preprocessor" option that would allow a passed in function to be able to edit a query before executing it

But, haven't had time to tackle it. Would definitely welcome a PR that adds this
@Logan M thanks for the quick reply. Does this mean all data is essentially accessible to everyone?
Essentially yes, unless your db has some kind of per-user gating on data (not sure if that's a thing)
Add a reply
Sign up and join the conversation on Discord