Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for nested drop downs is much needed! #7052

Open
nakamurau1 opened this issue Jul 10, 2024 Discussed in #6744 · 2 comments
Open

Support for nested drop downs is much needed! #7052

nakamurau1 opened this issue Jul 10, 2024 Discussed in #6744 · 2 comments

Comments

@nakamurau1
Copy link

Discussed in #6744

Originally posted by NielsKSchjoedt February 5, 2024
This is a copy of: https://discuss.redash.io/t/observable-query-based-dropdown-list/3229

Redash is such a great tool 🎉 - however, one thing I really lack is nested query based drop downs. Basically the idea is, that if your database has two columns, say: country, city then those could be used to populate two nested drop downs. One for country, one for city. However currently, that is not possible because the queries powering drop downs cannot interdepend:

Skærmbillede 2024-02-05 kl  11 57 56

Example of what we need

You could have a query like:

SELECT DISTINCT country
FROM my_db.my_table 
ORDER BY country

Then add a "Query Based Drop Down" with those countries

Then use the selected variable in another drop down query for city:

SELECT DISTINCT city
FROM my_db.my_table 
WHERE country = '{{country}}'
ORDER BY city

It is such a pain this functionality does not exist 😬

@nakamurau1
Copy link
Author

@arikfr
Hello,

I would like to get your advice on the following proposal.

📡 API

My proposal is to create a POST: /api/queries/<query_id>/dropdowns/<dropdown_query_id> endpoint with similar functionality to POST: /api/queries/<query_id>/results.

💻 Frontend

I plan to add a new query parameter type called “Dynamic Query Dropdown.” When other parameters in the Dashboard or within the query change, this API will be called to update the dropdown content accordingly.

Are there any issues or concerns with this approach?

Thank you for your guidance! 🙏

@nakamurau1
Copy link
Author

Hi @justinclift,

I recently opened this issue (#7052) about adding support for nested query-based dropdowns in Redash. Could you take a look and provide any feedback or suggestions?

Thanks,
@nakamurau1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant