Hacker News new | ask | show | jobs
by cpsempek 844 days ago
I also hate Tableau for this reason. However, it's a bad pattern to be storing custom SQL in a BI tool IMO. Better to create tables or views which hold your report logic and are stored in git. That way you're decoupling defining metrics and business logic from your BI tool, making that information queryable in your warehouse by users or other tools (and easily viewable!).
1 comments

It's a best practice yes, but in practice when you produce any data mart you end up getting questions to power deep dives and that's where custom SQL ends up coming from. There's usually a right way to answer the question, and a fast way with custom SQL, and with ad-hocs the fast way wins every time.

Here's an example, you do a customers rollup and an orders rollup, but a user asks for average order value of return customers buying product X. In SQL, that's a semi join of order line items, on your orders table and an inner join on daily customers to determine if they're a new customer. But no BI tool I've ever used has semi joins, so when you join in the tool your order values are multiplied and you're back to custom SQL to fix it.

It's that or build a whole new mart to answer this one question.