I am using embedded reports in my web app, and need to filter reports based on the web app's logged in user. I currently pass the web app userId to USERNAME() when I embed the report and use row level security. The reports are all SQL queries with a 30 minute refresh cycle.
This works for small datasets, but I have 10,000 users, and some datasets for all users are several GB which is too big to refresh regularly and the visual interactions are too slow to use.
What is the recommended way to surface the report to the customer? Ideally the report would refresh on click with dynamic SQL by passing the userId to the query but I don't believe this is possible?
I had an idea to execute API calls on the report button click to update a dataset parameter and refresh the dataset before generating the embed token, but I have hit an API request limit.