func (datasetClient) Create(
ctx context.Context,
kind datasets.DatasetKind,
codeName string,
name string,
fields []datasets.Field,
options ...datasets.DatasetOption,
) (*datasets.Dataset, error)
Create a dataset with the given code name, display name, schema kind, and custom fields.
Parameters
kind
datasets.DatasetKind
required
The dataset kind.
The stable code identifier for the dataset.
The display name of the dataset.
The custom fields in the dataset schema.
Options for dataset metadata.
Options
datasets.WithSummary(summary string)
Set a short dataset summary.
datasets.WithDescription(description string)
Set the dataset’s markdown description.
Dataset kinds
A dataset that contains timestamp, ID, and ingestion time fields.
datasets.KindSpatiotemporal
A dataset that contains timestamp, ID, ingestion time, and geometry fields.
Returns
The created dataset object.
dataset, err := client.Datasets.Create(ctx,
datasets.KindSpatiotemporal,
"my_catalog",
"My catalog",
[]datasets.Field{
field.String("source").Description("Source system"),
field.Float64("cloud_cover"),
},
datasets.WithSummary("Scenes prepared for analysis"),
)