-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
No values in "a list of all values" filtering widget – metadata.js:228 Missing id #7542
Comments
Does this work on your machine with the sample dataset? |
Is this a dashboard filter or a query builder filter? What is the metadata type and the underlying data type of field is it that you're attempting to filter on? If it's a dashboard filter, which type of filter widget is it (date, id, location, category)? |
@danieltanfh95 – with the sample dataset, I get the same console error, but it actually shows the available values immediately upon placing focus on the search widget. @mazameli – this was a query builder filter (SQL mode), using the "Category" filter type (the only one available). All data in question are strings. |
Tried to change the filtering settings for the field in question to "Search box" (from "a list of all values") and that worked! I'll change the title to make sure it reflects the fact that this only occurs with the "a list of all values" filter type. |
@Poggen glad to hear you found a fix. I think I have a hunch as to what's going on: does your field have more than 100 distinct values? If so, I think what's happening is that Metabase should have changed the filtering-on-this-field setting for that field to "search box" automatically, but did not. Secondly, if that's the case, we're not handling the case of a field with more than 100 values set to "a list of all values" correctly: presumably, this scenario should either result in a list of each and every possible field value (potentially a bad outcome), or we should force fields with more than 100 values to either be set to "search box" or "input box." |
@Poggen does your Field have more than 100 distinct values? |
@tlrobinson have you seen this JS error before? It's the same one in #7543 |
@mazameli have you been able to repro this at all locally or on our Stats instance? |
@camsaul not yet. What I'm in the process of doing to try and repro this is go back to an old db with version 0.28.4 (happened to be the most recent jar I had lying around), create a couple of questions and dashboards with category filters on high cardinality fields with redshift, mysql, and postgres data, copy the app db over and then "upgrade" it to v0.29.0 locally and see what happens. |
ok let me know if you figure out how to repro. I'm doing the same thing. I think most of the effort involved in this fix will be reproducing and once we can do that the fix should be easy |
@camsaul sorry for my late response. All of the fields in our DB definitely had >100 distinct values. |
@camsaul so I was able to reproduce this:
As long as the field is set to "search box," new dashboard filters that use that field seem to correctly show the search box. tl;dr — seems like Category fields aren't correctly getting switched over to "search box" when they have more than 100 distinct values. Also seems like our behavior for "a list of values" for fields with > 100 values is bad UX, if not outright broken. |
Correction: I just tried a new dashboard filter using the Vendors field in the sample dataset which has 200 distinct values. It is set to "a list of values," and it is correctly displaying the full list. My other field in the example in the previous comment had 375 distinct values, so I now suspect the problem is actually when there are more than 300 distinct values set to "a list of values." Just for additional context, my ID field in the example in my previous comment has 17,712 distinct values. |
Yeah, I've found another way to repro this, if you mark a Field with > 100 distinct values as "list" it doesn't list because there's a restriction in there somewhere that "list" Fields have to have 100 values or less. The big issue was when we migrated over from "Categories" having 300 values or less to "list Fields" having 100 or less things that were caught in-between those two limits are "having a bad time" so-to-speak. Should have a fix in a bit. |
Fixed by #7556 |
Was super excited to try out the new search widget, but I am unfortunately unable to get it to work. The first time I focus on one of the filters in order to bring up the "Search the list" expanded input field, the following error is being thrown in my console:
I am able to perform the query by manually typing a value into the filter, but the search / autocomplete feature would have really aided the data exploration possibilities.
The text was updated successfully, but these errors were encountered: