-
Notifications
You must be signed in to change notification settings - Fork 118
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
Remove data type suffix? #228
Comments
Hi @RobertLowe, despite your explanation I would still bet in creating views is a better solution. You can easily automate the view creation using a bit of pl/pgsql like:
If you want to touch ToroDB Stampede you should have a look on how it generated fields names in the d2r part of the engine. The problem is that if you have collisions in same column name with different type you will need to create a logic to hadle that (currently the code is highly coupled with the assumtion that the identifier will de unique). You can start looking at classes in https://github.com/torodb/engine/blob/master/core/src/main/java/com/torodb/core/d2r and in particular in the class DefaultIdentifierFactory.java |
Awesome, thanks! |
Is there or can you point me where I could remove the data type suffix torodb creates? I know torodb does this by design to handle conflicting data types as mentioned in #226, but here's my use case:
I use Metabase which is a popular BI tool (https://github.com/metabase/metabase) by default it transforms columns by replacing underscores to spaces and Title Casing field names (
created_at_t
=>Created At T
), this makes metabase far less user friendly. I know I could create views to handle this, but my issue with that is since our data domain is dense it really creates a lot of tables to create views for.I'm not sure if I should patch metabase or stampede, but it feels more at place here for my use case.
This would also clean up things for Hasura a GraphQL endpoint https://github.com/hasura/graphql-engine
Perhaps in the case of a conflict the suffix could remain
Thanks,
The text was updated successfully, but these errors were encountered: