Metadata is reset when editing a model SQL query

The metadata is reset every time I edit the saved model. Is this the correct specification?

The operation procedure is as follows.

  1. Create a model with SQL query (customize column name)
  2. Save
  3. Change the query from editing the model
  4. The customized column name is reset
  5. The same applies to the metadata edit screen.
2 Likes

Hi @Kazuya
I've created an issue for this:
https://github.com/metabase/metabase/issues/20624 - upvote by clicking :+1: on the first post

@flamber The issue described here sounds different to the GitHub issue that you linked to or is it a symptom of the same underlying problem?

I have painstakingly setup a model with all the metadata etc. If I now add a new column to my select clause all the metadata disappears. This is totally broken. I can't even bare the thought of using models anymore until this is resolved.

I'm using Metabase v0.52.2, and I'm still having this problem. I use SQL to build a model, edit the metadata so that the filters work, custom column names, custom formatting, and so on. Click save, and everything is fine. I go back into the Model, add a WHERE clause, another column, or change a column name, and all the custom Metadata I've added is gone. Completely. Names, database column maps, formatting, everything.
I couldn't find any open issues regarding this issue in GitHub, and the previous issue mentioned in this thread does not address the problem. Metadata for models is lost altogether, not simply unused in the question view.

Here are some similar issues, but don't address the custom SQL issue directly.
https://github.com/metabase/metabase/issues/47890
https://github.com/metabase/metabase/issues/26755