Dropdown Filter on Model-Based Question NOT working

Hello, I upgraded to 45.1 yesterday and I have found a problem. Dashboard Filters on questions based on a model do not work as dropdown. I know for a fact that what I'm going to show you worked in previous versions but I am not sure if this is an issue of 44.6 (my previous version in which I also had an issue discussed here) or 45.1. Steps to reproduce in sample database:

-1) Create a model out of an sql query SELECT * FROM PRODUCTS
-2) Map every column of the model to the exact same column of PRODUCTS table of the Sample Database as shown below

-3) Create a question based on this model including aggregation on the column Category as below

-4)Add the question to a new dashboard.

-5) Add a "Text or Category" filter, select Dropdown in what kind
-6) Map filter to Category as shown in Red.

As you can see mentioned in green, if you try the option of default value dropdown works as it should.
Now save and go to the dashboard. When you go to use the filter it only shows option of writing text and not dropdown list as it should. Why is that? I am sure that this procedure was the key to get dropdown list in model based questions before but now I can't seem to get it done.

This is the issue:

Thank you

1 Like

Hi @Ziggy
If you check the Admin > Troubleshooting > Logs, then you'll see it's causing the same errors as https://github.com/metabase/metabase/issues/12985

Hello @flamber thanks for your answer.

Are you sure this is the same issue? The reason I'm asking is that those steps worked for me before, while the issue you are referring to was still open. In browser console I get a 400 - Bad Request error. And it says that:

Is this the same error? I am sorry if I am a little going around the same things again and again but I don't understand why already functioning dashboards just won't work now.

Thank you again in advance.

@Ziggy Everything done in the frontend is just sending API requests, so if you are seeing an error in the browser console, then check the logs.

Read the issue description again, specifically "Reproduce example 2" and the stacktrace.

If you are able to make this work in a previous version, then please include the exact version. I'm not able to get it to work in any version where Models existed.

Create Views on your database instead of using Models.

@flamber I managed to make this work like I was used to in versions 0.43.7, 0.44.3, 0.44.5. I think that what makes the difference between my issue and the issue you referenced is my second step.

I map each of the columns of the model to their corresponding columns in sample database table. This is extremely weird, I know, but If I followed the exact steps I posted in these versions and it worked.

@Ziggy I cannot reproduce. Yes, you need to manual map SQL questions, since Metabase otherwise have no idea how the field works, since that would require https://github.com/metabase/metabase/issues/5594

But again, just create a View on your database instead of using Models - then everything will work.

1 Like

@flamber It's ok, thanks a lot for your time. I get your point but it's a little more complicated than that, I kind of need to work with models so other people can interact with them. Anyway, thanks again for your time.

Have a nice day.