Any ways to power a Databricks SQL dashboard widget with a dynamic query?

bl12
New Contributor II

Hi, I'm using Databricks SQL and I need to power the same widget in a dashboard with a dynamic query. Are there any recommended solutions for this?

For more context, I'm building a feature that allows people to see the size of something. That size is determined by traits that the user selects. I was thinking of creating one query via API and then changing the same query every time the user chooses new traits also via API. However, the problem is that 2 users can't view different queries at the same time since there is only one widget.

Before when we used Redash, we passed entire queries as input to a parameter for the widget through url. However this is no longer possible with Databricks SQL and we had problems with HTTP GET limits. So basically I'm wondering if there's a way for multiple users to change the query behind the same widget? I haven't found any ways that would allow me to input a query as a parameter.