DatasetColumnsClient
adaline.datasets.columns manages the column schema of a dataset — add, rename, or delete columns, and resolve dynamic columns whose values are produced by prompts, HTTP requests, or dynamic functions.
Access
@adaline/api:
type can be input, output, metadata, or a dynamic type such as prompt, api, or dynamic-function.
create()
Append one or more column definitions to a dataset. Existing rows get empty values for the new columns.Parameters
| Name | Type | Required | Description |
|---|---|---|---|
datasetId | string | Yes | Dataset identifier. |
columns | AddDatasetColumnsRequest['columns'] | Yes | Array of column definitions. Each has name, type, and type-specific settings. |
Returns
Promise<AddDatasetColumnsResponse> with { columns: DatasetColumn[] } — the newly added columns with server-assigned IDs.
Example
update()
Change a column’s name, type, or settings.Returns
Promise<DatasetColumn> — the updated column.
Example
delete()
Delete a column from a dataset. All row values for this column are dropped.fetchDynamic()
Trigger on-demand resolution for dynamic columns — columns whose values are generated from another prompt, an HTTP endpoint, or a dynamic function. Returns the resolved values without persisting them.Parameters
| Name | Type | Required | Description |
|---|---|---|---|
datasetId | string | Yes | Dataset identifier. |
query | FetchDynamicColumnsRequest | Yes | { columnIds: string[]; rowIds?: string[] }. Resolve the given dynamic columns against every row (or only against the specified rowIds). |
Returns
Promise<FetchDynamicColumnsResponse> with { results: Array<{ rowId: string; columnId: string; value: DatasetCellResponse }> }.
Example
See Also
- DatasetsClient — parent client
- DatasetRowsClient — sibling sub-client for rows
- API reference: Add columns · Update column · Delete column · Fetch dynamic columns