Datasets.Update
func (datasetClient) Update(
ctx context.Context,
id uuid.UUID,
kind datasets.DatasetKind,
codeName string,
name string,
fields []datasets.Field,
options ...datasets.DatasetOption,
) (*datasets.Dataset, error)Update an existing dataset by ID with the given code name, display name, schema kind, custom fields, and metadata.
New non-queryable fields can be added to a non-empty dataset. Changing whether an existing field is queryable or adding a new queryable field is only supported while the dataset is empty.
You can append allowed enum values after ingesting data. To remove, rename, or reorder them, the dataset must be empty. Include all fields and annotations you want to keep; see updating enum values.
Parameters
id uuid.UUID required The ID of the dataset to update.
kind datasets.DatasetKind required The dataset kind.
codeName string required The stable code identifier for the dataset.
name string required The display name of the dataset.
fields []datasets.Field required The full custom field list for the dataset schema.
options []datasets.DatasetOption Options for dataset metadata.
Options
datasets.WithSummary(summary string) Set a short dataset summary.
datasets.WithDescription(description string) Set the dataset’s markdown description.
Field options
Queryable() Make a non-repeated String, Bool, Int32, Int64, Uint64, or Float64 field available for server-side custom
field filters. Custom Enum fields can also be queryable, including repeated enums. A dataset can contain at most
two queryable string fields; custom enums do not count toward this limit.
Returns
The updated dataset object.
See Queryable fields for schema constraints and Filter by custom fields for query syntax.