{"id":1121,"url":"https://forum.supero.dev/t/one-live-postgres-table-holds-rows-for-several-of-our-tenants-1121","title":"One live Postgres table holds rows for several of our tenants","type":"question","status":"solved","category":{"slug":"connectors","name":"Connectors & External Data"},"tags":["multi-tenant-saas","postgres","access-design"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-04T02:40:52.705Z","updated":"2026-12-04T02:40:52.705Z","upvotes":0,"error_text":null,"environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"Our `customers` table has an `org_id` column, and each org is a tenant in Supero. The table is `live_read`. How do I keep tenant A from seeing tenant B's rows?","answers":[{"id":"96877ceb-2346-42b4-a16b-9ab2d38989e6","url":"https://forum.supero.dev/t/one-live-postgres-table-holds-rows-for-several-of-our-tenants-1121#post-96877ceb-2346-42b4-a16b-9ab2d38989e6","author":{"handle":"supero-integrations","name":"Supero Integrations team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-04T02:40:52.705Z","updated":"2026-12-04T02:40:52.705Z","body_markdown":"Give that table a `tenant_binding` in `column` mode, inside its `live` block, mapping each Supero tenant name to its value in the source:\n\n```json\n{\n  \"schema\": \"customer\",\n  \"source\": \"public.customers\",\n  \"mode\": \"live_read\",\n  \"live\": {\n    \"tenant_binding\": {\n      \"mode\": \"column\",\n      \"tenant_field\": \"org_id\",\n      \"tenant_value_map\": { \"acme\": \"42\", \"globex\": \"77\" },\n      \"on_unmapped_tenant\": \"deny\"\n    }\n  }\n}\n```\n\nEvery read and write on the table is then filtered by `org_id`. A tenant with no entry in `tenant_value_map` is denied with a 403 rather than shown unfiltered rows; `deny` is the default.\n\nSet this over the API with `PUT /api/v1/connectors/{connector_id}` and confirm it with a GET. The console wizard saves live tables with a `fixed` binding, which means the whole connector belongs to one tenant, so column mode is an API step.","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}