Multi tenancy in single database with different app ids
Open
question
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Problem**
Hello, I have a multi tenant setup in a single database. The docs recommend using row level filters to achieve multi-tenancy in this situation, but I'm wondering what the pros/cons of generating different data models for each tenant would be instead of injecting row level filters.
**Related Cube.js schema**
```javascript
const {
securityContext: {clientId}
} = COMPILE_CONTEXT;
cube(`orders`, {
sql: `SELECT * from orders where client_id = ${clientId}`,
....
})
Contributor guide
Assessment
This issue has not been assessed yet.