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

Automatically assign "Verbose Name" for a table's fields #4701

Closed
3 tasks done
CasperLiu opened this issue Mar 28, 2018 · 2 comments
Closed
3 tasks done

Automatically assign "Verbose Name" for a table's fields #4701

CasperLiu opened this issue Mar 28, 2018 · 2 comments

Comments

@CasperLiu
Copy link

CasperLiu commented Mar 28, 2018

Hello, Superset authors,

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
    Yes.
  • I have reproduced the issue with at least the latest released version of superset
    Yes.
  • I have checked the issue tracker for the same issue and I haven't found one similar
    Yes.

Superset version

Superset 0.23.3

Expected results

This ticket is to discuss how to automatically assign "Verbose Name" for a table's fields("Column" name is used in Superset).

So far user can give a alias name("Verbose Name" term in Superset world) for a certain field of a table. Thanks for this good functionality! This is very useful and helpful - we could use a meaningful name for a field rather than the direct field name which may be hard to understand.
Below is the step to assign a verbose name for a column.
On Superset GUI, go to "Sources"->"Tables", and go into "Edit record" button for the field to you want to assign a "Verbose Name".

However, user has to fill the "Verbose Name" one by one, this will take a lot of time and not automatically.

There is a common scenario is that user has put some easy-to-understand term in the "Comment" part of each table's field.
If Superset adds below functionality:
Support to use table field's "Comment" as the "Verbose Name" when user adds a table or later step(such as user can enable a checkbox for "Use comment as the verbose name").
If comment is empty, then leave "Verbose Name" as emty too.
This will be very useful for non-English user, like Chinese, Japanese, who will see the meanful "Comment" appear in the Chart/Dashboard directly without manually filling per each field, if this functionality is supported.

For example:
MariaDB [management]> show create table teacher_mgt;
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| teacher_mgt | CREATE TABLE teacher_mgt (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
name varchar(20) NOT NULL COMMENT 'Full Name 名字',
sex varchar(10) NOT NULL COMMENT 'Gender 性别',
age int(11) NOT NULL COMMENT 'Teacher Age',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

Besides, a way to import/export the mapping between fied and "Verbose Name" could also be a very good functionality.

Actual result

So far, user has to fill in "Verbose Name" for columns one by one, if lots of tables, this will take a lot of time and is not efficent or automatic.

Steps to reproduce

Already talked in "Expected results" Section.

Thanks a lot in advance for your answers and nice support!

Nice Regards,
Jiaxu

@mistercrunch
Copy link
Member

We're planning on rewriting the "Table Editor" soon. Picture a nice editor inside a modal widow displayed on top of the explore view.

Also this PR bellow makes metric-definition part of the MetricControl selector.
#4663

You could picture a similar approach for the "Group By" selector as an easy way to define labels and calculated dimensions.

@CasperLiu
Copy link
Author

Dear mistercrunch,

Thanks for your sharing for the next phase's plan!
They indeed looks beautiful and are what we need.
Anticipating your great work! Hope everything goes well!

Nice Regards,
Jiaxu Liu
刘佳旭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants