The community member is using SQLTableRetrieverQueryEngine and wants to filter the results to only include their own records, not all user records. A community member suggests adding a "sql_query_preprocessor" option that would allow a passed in function to edit the query before execution, but they haven't had time to implement it. Another community member asks if this means all data is accessible to everyone, and the response is that it is, unless the database has some kind of per-user data gating, which is uncertain.
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?
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