Wishlist: param dropdown for data explorer query

I’d love to be able to specify something like this:

-- [params]
-- groups.id :group_id

to get a parameter input that’s a dropdown of groups. I’ve named the value group_id here because I assume that’s what such a dropdown would give me.

3 Likes

I think this would be really useful too. :+1: Something like the existing user_id selectable parameter but for groups. Even better if it could accept multiple values. :slight_smile:

1 Like

Wait, what?

Can you point me to where it shows how to use that?

1 Like

You can use something like:

-- [params]
-- user_id :user

SELECT *
FROM posts
WHERE user_id =:user
LIMIT 5

And that will bring up a dropdown where you can autocomplete in a user. :+1:

However, I have just noticed that the first time you run it at the moment it errors and doesn’t bring up the parameter box, but does if you refresh the page. I shall see if I can get someone to check that out. :slight_smile:

3 Likes