-
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
Allow ordering of columns in Data Model #3720
Comments
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Just started to create a new issue, but found this one just in time. Since I already wrote "my" issue, I'll just paste it here anyway ;) For my use case, preserving and/or manually arranging the order of the columns would be very useful. This could be done either during sync (i.e. to preserve the original order of the columns) or by having a possibility to manually arrange them in the Admin > Data Model view. Example:
Currently, there is the possibility to "customize this table" when adding a new question, where the fields can be (de)selected and their order can be arranged. However, this reordering needs to be done for each question --> having a custom order in the data model would be a much more elegant solution. |
@salsakran could you add priority to this please ? This is especialy tedious when you have a table with ~40 columns. |
Thanks for the feedback; definitely makes sense. One workaround for now, if you're doing any querying with the graphical custom query builder, would be to save a question that just returns all the raw data in a particular table, but with the columns reordered the way you'd like. Then you can use that saved question as a pseudo data table for new custom questions. More on these "nested" questions here: https://www.metabase.com/blog/Nested-Queries/ |
@mazameli Thanks for hte quick reply. I know about this workaround. |
This comment has been minimized.
This comment has been minimized.
@mazameli Second problem is - filter id widgets not working (Not filter by name, not show name by id) |
Same here. It would be very useful to let us reorganize fields order or at least choose between automatic alphabetical order and database original order. |
This is a very important feature for our usage too. It is fine to use the work around mentioned above but when you ask someone to use your data structure from the raw tables in the DW (which is far more complete) they will have to go through the pain of unticking and organising all over again. Is there anyone that is looking into adding a setting within the data model that allows either alphabetical ordering as it is at the moment or db ordering as collected from the information schema? Would try to dive into the code myself but I am sure someone who knows the project could do it in a heartbeat... |
In our case:
🙏 Please don't let the potential of building a complete ordering feature prevent you from shipping the simple fix! |
This feature is theoretically simple and it would be really handy. Hope someone can fix it soon. |
Is this feature being worked on? |
I am willing to
I am looking through the code to see where the reordering takes place and I am having a hard time locating it. Anyone have any idea? |
This is a big issue, Did someone find any solution to this? |
Metabase should have picked the order of the columns as it is coming from the Source DB table. |
No, still have this problem and it is very painfull for us too. We have table with more than 100 columns... If the feature "allow ordering" is too long due to UI, a MVP could be to switch from automatic alphabetical ordering to keeping the DB Source order. |
I agree that the incremental step we should seriously consider taking on this is to preserve the order of columns as they are in the database. This feels similar to the "friendly field names" behavior that we undid — we're currently trying to be overly clever and in the process are undermining what people actually want and expect. |
Notes from our meeting about this today:
|
I think FE work here is just limited to making the admin data model support drag-and-drop reordering for Fields, and adding the drop-down for Table "sort style" |
I am seeing the drag and drop problem mentioned by @mattarderne . Firefox 84.0.2. Metabase v0.37.5-SNAPSHOT using this: |
Drag and drop works on some columns but does not work on others (column goes back to the initial place). Tried Firefox and Chrome. |
Thank you for your support again @flamber . We will check. I thought that PR would be new enough to already have this, but maybe not. |
Hello |
@eozturkTF It has been available since 0.36.0: https://www.metabase.com/blog/v36-release-announcement/index.html |
thank you |
Currently it is not possible to change ordering of columns in Data Model tab. It seems that columns are ordered by database column name. If the business name is different to database column name, it is hard to find requested field.
⬇️ Please click the 👍 reaction instead of leaving a
+1
or 👍 commentThe text was updated successfully, but these errors were encountered: