Lurker News

Comments (79) 30 threads

Earlier comments
tomerbd#
Brilliant. Interesting to see you used svelte! Anyone else has experience with it?
mattmanser1 reply#
So I made something similar to this at a couple of my jobs. We could basically add a SQL script as a file to a folder and it would automatically have a new report, downloadable, formatted, run on-demand. Even a pretty basic one is pretty handy, as they only take a day or two. I hadn't got round to adding variables, I like the solution.

One of the things I added is that you could add column formatting in the field names, so a $c would turn it into a currency field, there was one to turn it into boolean checkbox, etc.:

    SELECT o.amount, p.price [price$c], p.price * o.amount [total$c]
    FROM orders o
    JOIN products p
It had other features too like you could set column widths by using @ like [amount@75] or even column grouping by dot notation [online.sales], [online.total_value$c], [instore.sales], [instore.total_value$c].
mattatkeyboard#
It does basic left/right aligning for strings/numbers etc.

It's a nice feature/idea but I'm torn between implementing it and also allowing you to do it in SQL...
I agree that concat('$', table.amount) as amount should be right aligned, but mine would leave it left aligned (as it became a string).

_frkl1 reply#
This looks really useful. How is authentication and authorization handled? Can I connect it to my Openid provider?
mattatkeyboard#
Authentication is not handled at all. Given it is a project with a front and back end (using a REST interface between) I think the correct approach is to do authentication on a load balancer. The approach is fully documented here: https://github.com/forbesmyester/esqlate/issues/5
mattbee1 reply#
It looks excellent! But I know https://redash.io already and used it in my last business - does this do something different? I'm always hungry for better SQL business admin tools though.
tyingq#
A quick scan of the docs seems to indicate redash is read only.

Load more comments