3 ms·
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 co
by data-ottawa 3y ago
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.