Webinar: Why logical layers matter, and how to use them -Watch now

Clean Up Your Code in Just One Click

Image of author
Nick Binder, Product Marketing Manager

September 13, 2016

2 minute read

SQLFormatter OG

Anybody who's ever tried writing code of any kind knows that style matters. Caps or no caps? CamelCase or use_underscores? Tabs or spaces?

Analysts are most effective when they can write queries the way they're used to. But there's no denying that when a complicated query gets shared in an unusual or messy format, understanding it can feel like deciphering a new language. That's a problem for data teams, where understanding query logic can be as important as sharing results.

For teams using Mode, inconsistent formatting is no longer an issue. We just added the ability to format SQL and make your code look great—in one click. Share code in a consistent, standardized style, without spending all your time on formatting.

How it Works

Formatting your query, no matter how long or complex, is now as simple as clicking a button. Write some SQL, and when you're ready to clean it up, just click the Format SQL button at the top of the query panel.

If you prefer the original style, just click the button again and the code will revert to your original format.

SQL formatting

There's a lot more you can do with Mode to simplify SQL, save time, and make analysis consistent for your entire team.

Use Definitions, snippets of reusable SQL logic, to write queries and analyze faster. If you want to go back to an earlier version of the analysis, quickly check your Query History to jump to a previous iteration. Add multiple queries to your report, or even query across multiple data sources. When you're ready to share your results, add charts to visualize your analysis—no export needed.

If you want to experiment more, jump right in and try the SQL formatting capability on a new query. If you have any questions, reach out to us at hi@modeanalytics.com—we love hearing from you!

Get our weekly data newsletter

Work-related distractions for data enthusiasts.