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
Proposal: Format SQL Query option in the Native Query Editor #9142
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hey, I'm writing a lot of sql queries for custom dashboard and reports, I'd love to see a "format SQL" button to clean my mess 🧹 I've started to look at the possibilities, from my understanding we should modify this file The main issue here, is to support the placeholders like I think one should dig into SQL parsers to properly format and lint the specifities of the metabase's SQL. The facebook SQL editor daiquery seems to handle this, see here in SQL Editing section Still, you can try the other formatting options here https://sql-formatter-org.github.io/sql-formatter/ Does anyone has more info on this ? |
This comment was marked as spam.
This comment was marked as spam.
Any update on this? Would be really nice! |
@ajubin as a former meta employee, i can say that Daiquery is honestly amazing and supported a lot of very nice things. Automatic formatting and automatic linting looking for errors are two of the main things I feel matabase is lacking. Been looking for a replacement for Daiquery since i left... |
Is it possible to force SQL formatting for all SQL questions? I don't like when my users create unreadable SQL queries and don't CAPITALIZE reserved words like SELECT, FROM and WHERE |
Proposal
One minor annoyance today in using the Native Query Editor in Metabase is the lack of an option to format/prettify queries.
So I propose to add a
Format Query
option to the Native Query Editor(See screenshot below for a mockup). If this is something that is of interest to the community, I can help contribute to the same.⬇️ Please click the 👍 reaction instead of leaving a
+1
orupdate?
commentThe text was updated successfully, but these errors were encountered: