Query parameters based upon user group

My use case:
I have multiple user groups in my system and I wanted to restrict the data access based upon the user group since the data source is the same for all users (S3 via Athena).

I was thinking if I can get the user group in my query so that I can use the same while querying. Is this feasible to do, if yes, can you explain how to do it?

Also is there any better way to achieve this?

Redash doesn’t support this but it would be useful. Ideally it would be possible to pass user credentials directly to the data source enabling row level security.