Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: SQL Viewer – UI for uber/queryparser, written in Haskell (github.com/dlthomas)
88 points by dllthomas on Oct 21, 2018 | hide | past | favorite | 9 comments


I threw this together a while back. I've been meaning to clean up the code a bit before sharing but that keeps not happening so I figure I'll try the other way 'round.

Big thanks to Matt Halverson for getting queryparser freed at Uber and to Heli Wang for more recent maintainership, as well as for their contributions to that project in the first place!


This is well done, thanks for sharing. It uses more of the page, though, if I get rid of the "float: left" on .frame and change min-width for textarea elements to 100%.


> This is well done, thanks for sharing.

Thanks!

> It uses more of the page, though, if I get rid of the "float: left" on .frame and change min-width for textarea elements to 100%.

I think I started that way; this felt better to me. That said, I'm not really a UI guy. More than happy to look at PRs :)


A similar tool is https://astexplorer.net/ , which I've found quite useful for the JS tools hacking that I've done.


Cool! I'd added the highlight-on-hover in an earlier version - been meaning to add that here too.

The other analyses are more interesting than just the AST, though, IMO, while the AST is most useful for people working on additional analyses.


I've been building a ssms clone for hive too. One of the biggest complaints from the business when we switched from SQL server to Hadoop is the terrible tooling.


Do you have any plans to support Snowflake and do you keep the syntax updated?


Adding a new dialect to the UI, given support in queryparser, is trivial, and I certainly plan to add anything with upstream support.

I know Heli has said Uber's happy to merge new dialects, but aren't working on anything at the moment.

I've got a Teradata dialect at work which we'll probably upstream at some point. I don't know of anything else in the works. I'd be happy to advise if anyone wants to work on adding a new dialect, Snowflake or otherwise.

Personally the thing I most want to get worked out, other than upstreaming work I've already done at my day job, is something that makes it possible to apply QuickCheck to a series of SQL statements, with pre- and post-conditions as expressed as SQL. Ideally with schema inference, but probably not starting there.


Thank you! Always nice to see Haskell on the front page of HN.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: