dataset, err := client.Datasets.Update(ctx, datasetID, datasets.KindSpatiotemporal, "my_catalog", "My catalog", []datasets.Field{ field.String("source").Description("Source system").Queryable(), field.Float64("cloud_cover").Queryable(), field.Timestamp("processed_at"), }, datasets.WithDescription("Catalog of scenes prepared for analysis."),)
datasets
Datasets.Update
dataset, err := client.Datasets.Update(ctx, datasetID, datasets.KindSpatiotemporal, "my_catalog", "My catalog", []datasets.Field{ field.String("source").Description("Source system").Queryable(), field.Float64("cloud_cover").Queryable(), field.Timestamp("processed_at"), }, datasets.WithDescription("Catalog of scenes prepared for analysis."),)
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.
Parameters
uuid.UUID
required
The ID of the dataset to update.
datasets.DatasetKind
required
The dataset kind.
string
required
The stable code identifier for the dataset.
string
required
The display name of the dataset.
[]datasets.Field
required
The full custom field list for the dataset schema.
[]datasets.DatasetOption
Options for dataset metadata.
Options
Set a short dataset summary.
Set the dataset’s markdown description.
Field options
Make a non-repeated String, Bool, Int32, Int64, Uint64, or Float64 field available for server-side custom
field filters. A dataset can contain at most two queryable string fields.
Returns
The updated dataset object.
dataset, err := client.Datasets.Update(ctx, datasetID, datasets.KindSpatiotemporal, "my_catalog", "My catalog", []datasets.Field{ field.String("source").Description("Source system").Queryable(), field.Float64("cloud_cover").Queryable(), field.Timestamp("processed_at"), }, datasets.WithDescription("Catalog of scenes prepared for analysis."),)