TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Handle customer DB access in SaaS

5 点作者 cyptus超过 2 年前
when providing SaaS how do you handle (big) customers that requests access to their data for BI applications?<p>most BI solutions like power bi struggles hard to obtain data from HTTP-APIs as they are paged, aggregated in other ways, authenticated with OAuth and so on. integrations are very easy if access to a sql layer would be given instead. But of course direct database access is also a struggle if using a multi tenant environment which would need at least some kind of row-level-security and a own read-replica. Also the customer needs to know every detail of the database schema which makes internal changes harder again and is an unnecessary detail.<p>Is there any other way then filling a second database event based with the correct „business-based“ schema (like a cache) and provide direct access to this? Is there any option to provide an „sql“ api to the application architecture?

4 条评论

mooreds超过 2 年前
In rough order of effort (and inverse order of intrusiveness to your environment):<p>You could use a view (or views) and a read-only user. The view could limit access to a single tenant and also abstract away changes to the schema if needed.<p>If you want more separation, you could use a read replica, again with a view.<p>You could also build an of ETL workflow to extract the tenants data, transform it if needed, and push it somewhere else.<p>Finally, make sure they pay for this. I&#x27;d scope out what they need and quote a price before doing anything except exploratory work.<p>We have an internal feature (we&#x27;ve yet to build) to offer a nightly database export of customers&#x27; data. We&#x27;ll just send it to an s3 bucket they provide and let them take the data how they want. But this is a feature that will be restricted to our enterprise plans, most likely.
评论 #33797952 未加载
pkrotich超过 2 年前
I would not add such access to your turnkey SAAS instrastructure. Perhaps you can offer a read-replica as an add-on but the headache will be massive when it comes to CI&#x2F;CD with little ROI for most of your customers.<p>This is an opportunity, I think, for you to sell an Enterprise Appliance version of your application at 1000X the price. Such whales (customers willing to pay for custom BI) can host it internally, in a private-cloud or as a manged private-cluster (copy). If you go add-on replica route - then perhaps replicating data to Analytic Database with nosql type storage format will be ideal in solving schema problems and decoupling the access.
评论 #33797953 未加载
bombcar超过 2 年前
If they&#x27;re that big can you provision their &quot;own&quot; copy of your infrastructure or at least the database?<p>And then foist handling database changes off on them.
评论 #33793941 未加载
_448超过 2 年前
CouchDB would be ideal for this use case. Export your data to CouchDB on a per-tennant basis and use inbuilt access control.