HI! Im a software engineer working on our dbt-base...
# community-support
y
HI! Im a software engineer working on our dbt-based data platform at PointFive, a startup that builds a finOps platform, and i have been trying to set-up elementary for the last day or so. So far it looks great! We run customer data in our dbt pipeline with the end goal of creating dashboards that allow the customer to visualize his cloud environment and cost. Our data platform has a fairly unique architecture - we keep each customer in it's own schema. we trigger dbt automatically right after collecting customer data from his cloud, and utilize dbt vars to build into the customers specific schema. This has many advantages for us: better performance for smaller customers (without complex clustering), simplified security (a customer can see his own schema and nothing else), better integration with our existing systems. That said, this approach limits our use of the elementary system - in which, each model can only exist in a single schema at a time. My naive, initial solution for this is to have an elementary schema for each customer (using the same logic we already have for choosing the correct customer schema). This will allow me to have an elementary dashboard for each customer, that I can expose through some simple server. Sounds nice, but: 1. this wont work if I ever want to switch to elementary cloud 2. this does not allow me access to cross-customer statistics, and therefore will require another dashboard system to compensate (most likely grafana) What's your take on this? Is the schema-per-customer architecture as nice as it seems, or is it a very tempting anti-pattern? Is there a way to support this use-case in elementary that I'm missing?
n
Hi Yonatan! 🙂 It is not necessarily considered an anti-pattern, we have seen this with a few other customers. The biggest issues we see with that set up are about scale. Once you gather many customers we often see exceptions for certain projects etc. which can make maintenance tricky. Since you have dashboards built on top, I am guessing there is a generic model that you instantiate for each specific customer in their own schema? We currently don't support this pattern. You can potentially union elementary tables for overall statistics and build a different report for each customer like you mentioned, but we have no support for it. Alternatively, you can see this thread - https://elementary-community.slack.com/archives/C02CTC89LAX/p1734349863088219 . There's an option to combine multiple dbt projects into one repository, and that would work well with Elementary. Let us know what works for you!
y
thanks for the answer! you assumed correctly that all customers are based on the same model and follow the same structure - in-fact, I only have 1 dbt project, which I run for each customer, changing the schema each time (using dbt vars), so the option for multiple projects is also not relevant in my case. I think as you said I'm going to union the customer-specific elementary tables and create my own grafana dashboard on top of it. thank for the help!