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

[Enhancement] Drop common column prefixes when prettifying column names #26

Open
ejektaflex opened this issue May 16, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@ejektaflex
Copy link

Often, people will create a table such as RENTAL, and then prefix all columns with the table name, such as RENTAL_ID, RENTAL_DATE, RENTAL_TITLE, etc. It seems that Ultorg already does some prettification of these column names, but it would be nice for it to check whether all columns have a common prefix and drop it before prettifying the table names.

Thanks!

@eirikbakke
Copy link
Contributor

Thanks for this suggestion! There are also some users who prefer to turn off the "prettificiation", so I will have to figure out how to best let users configure this.

@eirikbakke eirikbakke added the enhancement New feature or request label May 16, 2022
@malcook
Copy link

malcook commented May 19, 2022

I too wish for more control of "prettifying" column names. Specifically, I would like to preserve the up/down case of the characters, but replace underscore and period with whitespace (allowing text wrapping in column titles to occur, which is very nicely handled).

edit: perhaps allowing user preference of a expression substitution operations. Expressed using perl's syntax in my case would be s/[\.\_]/ /g

@eirikbakke
Copy link
Contributor

@malcook Is the motivation for replace-symbol-with-whitespace primarily to enable line wrapping? There's actually some code in Ultorg already to permit line wrapping around e.g. periods and underscores, and evenInCamelCaseNamesLikeThis, without the need to insert visible whitespace. (You can test this by renaming a column in a perspective.) Would you still want the symbols to be replaced with whitespace, for cosmetic/readability purposes?

@malcook
Copy link

malcook commented May 19, 2022

@eirikbakke - yes that is the motivation, but only partially. Additionally your name parser Capitalizes Each Parsed Word which I find problematic. I often use mixed case in my identifiers which generally I want preserved. For example, a source column of isDE appears as "Is De". But "DE" is an acronym (for "differentially expressed" when talking about a gene) whose case I would prefer be preserved. Giving me regex control over the parsing would provide for such, but, perhaps there is a better compromise.

@eirikbakke
Copy link
Contributor

As mentioned on #49, there is now an option to turn the "prettification" of table/column names on and off in Ultorg 1.2.7.

The option to drop common column prefixes remains on the TODO list (tracked by this issue).

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

No branches or pull requests

3 participants