SQL formatter/beautifier

SQL queries can get hairy and I rely a lot on my desktop app's beautifier.

This works great most of the time, but unfortunately it removes curly braces, so if I have something like where ({{!table1.selectedRow.data.email}} or email = {{table1.selectedRow.data.email}}), it will turn it into where (!table1.selectedRow.data.email or email = table1.selectedRow.data.email), which obviously doesn't work.

It would be great if Retool would give me a button to beautify my SQL query code.

Hey @nacho! Have you seen this little beauty? I think all SQL resource types have this option available!


Oh, wow. Exactly what I was looking for. :clap: I'm glad I asked. :grin:

Thanks, Alex :+1:

1 Like

Would it be possible to also add this shortcut in the Query Library?

Ah, that’s an excellent point. I didn’t realize it wasn’t in there already but we’ll mark that down!

1 Like

+1 to this. Do you have an update on this feature request?

I have ~70 queries in the Query Library and I end up having to copy/paste the query into another SQL editor to format it and copy/paste the query back in.

1 Like

Sorry @joew, no update quite yet :confused: