A tenant dataset source links a tenant and a base dataset to a connection and a table ( source_sheet ) or SQL query ( source_query ). When an embed token of that tenant queries the base dataset, Luzmo queries the tenant's table or query instead of the base dataset's own source. Callers without a tenant keep querying the base dataset's source.
The tenant's table or query must contain every shared field of the base dataset: each column that has a source_name , is not a derived column, and is not assigned to a tenant. A shared field matches a column of the tenant's table or query when source_name , type and source_type are all equal. The tenant's table or query can contain additional columns: these are the tenant's own fields.
Tenant field discovery
When an embed token of the tenant retrieves the base dataset with a Column include, the response also contains the additional columns of the tenant's table or query. These are discovered fields: they are not saved yet. A where , limit or offset on the Column include leaves them out.
A discovered field has a deterministic id : the same tenant, dataset and source column always give the same id.
Search Column does not return a discovered field, and updating or deleting it returns 404 .
A discovered field is saved the first time the tenant uses it in a data query, or references it in the expression of a derived column or formula. Luzmo then saves it as a column of the base dataset, with the same id , assigned to the tenant. Referencing it in an expression requires use rights on the dataset through the token's rights .
A saved column behaves like any other tenant field. Changing it requires modify through the token's tenant_fields_rights (see Create Authorization ).
Queries on a tenant dataset source don't use the base dataset's acceleration . They always run on the tenant's table or query.
Only main-organization users can create, retrieve, update or delete tenant dataset sources. For other callers, such as embed tokens of a tenant, these requests fail with 403 .
Update the connection, table or SQL query of a tenant dataset source. tenant_id and securable_id are immutable.
To switch between a table and a SQL query, set the property you no longer use to null in the same request. Otherwise the update fails with Exactly one of source_sheet or source_query is required.
The update runs the same validation as create. Saved columns of the tenant whose source column no longer exists in the new table or query are deleted.
Luzmo validates the source against the connection before it saves it. Error messages call the tenant's table or query the "tenant source", and the base dataset the "logical dataset".
| Status | Message | Cause |
|---|---|---|
400 | Exactly one of source_sheet or source_query is required. | Both or neither of source_sheet and source_query are set. |
400 | <property> must be a UUID. | tenant_id , securable_id or account_id is not a UUID. |
403 | You need Modify rights on dataset <id> to manage its tenant dataset sources. | No modify rights on the base dataset. |
403 | You need Use rights on connection <id> to route a tenant to it. | No Use rights on the connection. |
404 | No tenant found with id <id>. | The tenant doesn't exist in your organization. |
409 | A tenant dataset source already exists for this tenant and dataset. | The tenant already has a tenant dataset source for this dataset. |
400 | <id> is a dashboard; tenant dataset sources apply to datasets. | securable_id is a dashboard. |
400 | Datasets on provider '<provider>' cannot have tenant dataset sources. | The base dataset has no connection, or its connector doesn't support schema discovery. |
400 | The logical dataset uses provider '<provider>'; the tenant connection uses '<provider>'. | The connection uses a different provider than the base dataset's connection. |
400 | The tenant source '<source_sheet>' could not be resolved on the connection. | The table or query doesn't exist or fails on the connection. |
502 | Could not reach the tenant source '<source_sheet>' (provider <provider>). | Luzmo could not connect to the connection. |
400 | Shared field '<name>' was not found in the tenant source. | A shared field is missing from the tenant's table or query. |
400 | Shared field '<name>' is <type> in the logical dataset but <type> in the tenant source. | A shared field has a different type . |
400 | Shared field '<name>' has source type '<type>' in the logical dataset but '<type>' in the tenant source. | A shared field has a different source_type . |
400 | The tenant source query returns more than one column named '<name>'. | The SQL query returns duplicate column names. For a table: The tenant source has more than one column named '<name>'. |
400 | The logical dataset has more than one shared column with source name '<name>' (<ids>). | The base dataset has two shared columns with the same source_name . |
For a SQL source, the messages that name '<source_sheet>' name 'the configured SQL source' instead.
npm install @luzmo/nodejs-sdk{
"id": "deea1671-0a97-4d3f-935a-1cbe7f1921a8",
"source_sheet": null,
"source_query": "SELECT type_of_burrito, number_burritos_savoured, delivery_minutes FROM public.burritos_suborg",
"created_at": "2026-09-29T11:08:09.661Z",
"updated_at": "2026-09-29T11:09:56.100Z",
"tenant_id": "508eb8ae-24f6-4f6e-a0cc-c050258af89e",
"securable_id": "f2f9c24b-bb17-4886-ba77-c5ee9dbc14e7",
"account_id": "99dc1808-bfd9-49f7-b448-e611e6e10a13",
"acceleration_id": null
}