Appearance
Partitioning
A partition restricts which rows an embed may load. It is part of authorization, enforced when Ridge serves data, and cannot be widened by dashboard state or browser code.
Partitions control data access. Interactive filters control which of the permitted rows a viewer sees:
| Partition | Interactive filter | |
|---|---|---|
| Purpose | Enforce row-level access | Change the current view |
| Chosen by | Your app or the URL creator | Viewer or host UI |
| Enforced by | Ridge data requests | Dashboard state |
| Can browser code widen it? | No | Yes |
Partition a dataset
A connected dataset is partitioned by one column. Set it when you add the dataset, or later by editing the dataset on the Data page. Once set, it cannot be changed or removed.
The column name must be letters, digits and underscores, and must not start with a digit.
When you partition an existing dataset:
- Ridge refreshes the dataset, splitting it by the column.
- Until that refresh finishes, partitioned requests are refused.
- Iframe embed links of ridges that use the dataset are revoked. Generate new links with a partition value.
- Ridges ask viewers for a partition value.
- JavaScript embed tokens are not revoked. Mint them with
partitionFilters.
Apply a partition
text
1. Open the dashboard's Embed dialog.
2. Choose Iframe Embed.
3. Enter the viewer's partition value.
4. Generate a signed URL.
The partition parameters are covered by the URL signature.
Changing or removing them invalidates the URL.js
// Your server, after authenticating the current user.
const response = await fetch("https://app.ridgedata.ai/api/embed/token", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RIDGE_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
dashboardIds: ["dashboard-id-123"],
partitionFilters: [{ column: "tenant_id", value: currentUser.tenantId }]
})
});Each partition filter is a { column, value } pair, where value is a string. Multiple filters all have to match.
Choose partition values securely
Use partition values from an authenticated server session or another trusted identity source. If the browser supplies a tenant id, verify that the user has access to that tenant before creating the token.
After a partition is applied, interactive filters operate only within the permitted rows. Clearing a component filter does not remove or weaken the partition.