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

Ability to create pre-populated SQL filters #5245

Open
gilhs opened this issue Jun 1, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@gilhs
Copy link

commented Jun 1, 2017

Roughly all of our queries are SQL queries, as they pretty much all require multiple joins or sub-queries. This causes different kinds of pains when it comes to interacting with the queries via a dashboard, mostly around filtering:

  • BigQuery Views cannot work with dropdowns, as view discovery is not currently supported (#3414)
  • Using field filters forces us not to use table or sub_query aliasing, due to its structure (#3328) which creates really ugly / hard to maintain queries
  • Using the same field filter for multiple tables fails, because field-filters are tied to a single table (this is probably the only thing that I cannot find a way to workaround)

This means that we are forced to use textual filters, which honestly generate a bad user experience.

I have 2 possible resolution suggestions:

  1. Add a new type of filters which has a SQL query behind it. This can be capped with # of results for performance. Usage would be identical to field filters (where {{filter}}) with a new type of variable called dashboard - just have to make sure that the dashboard filter uses the same name (e.g. filter) and it should work.
  2. Add ability to create pre-populated filters using the admin panel. These could be dynamic (SQL, same as above) or static (based on a list of updatable values through the panel).

This would be a great addition to MB (which is an amazing product btw!), and would remove one of the biggest pain-points we are experiencing with using it.

@salsakran

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2017

Thanks for the thought out suggestion! Really appreciate how much context you've put into this.

I'm digesting your suggestions and trying to think through how this would all work.

@salsakran

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2017

oh, are you using legacy or standard sql?

@gilhs

This comment has been minimized.

Copy link
Author

commented Jun 4, 2017

Currently using legacy, but it is my understanding that going forward you plan to only support the standard syntax, so will sooner or later migrate.

By the way - I think this suggestion is more broad than just BigQuery, it's relevant for all SQL based queries seeing as how field filters are limited to a specific table (and a SQL might want to join/union multiple tables that use said filter).

@gilhs

This comment has been minimized.

Copy link
Author

commented Jun 14, 2017

Another piece of feedback - yesterday I was sitting with our product team, and I was showing them the self-service question tool. Once snag we hit was not having auto-complete for possible values when adding filters - something they are used to from working with other tools (e.g. Mixpanel).

While this is not the same use-case, it's similar enough that a single solution might be plausible for both cases.

@RomanCPodolski

This comment has been minimized.

Copy link

commented May 11, 2018

Is there progress on this?

@flamber

This comment has been minimized.

Copy link
Contributor

commented Feb 16, 2019

Related to #6820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.