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.
Fields created with field.String, field.Bool, field.Int32, field.Int64, field.Uint64, or field.Float64 can be
marked queryable. Queryable fields cannot be repeated, and a dataset can contain at most two queryable string fields.
Parameters
Section titled “Parameters”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 custom fields in the dataset schema.
options []datasets.DatasetOption Options for dataset metadata.
Options
Section titled “Options”datasets.WithSummary(summary string) Set a short dataset summary.
datasets.WithDescription(description string) Set the dataset’s markdown description.
Field options
Section titled “Field options”Queryable() Make the field available for server-side custom field filters. Choose queryable fields before ingesting datapoints.
Dataset kinds
Section titled “Dataset kinds”datasets.KindTemporal datasets.DatasetKind A dataset that contains timestamp, ID, and ingestion time fields.
datasets.KindSpatiotemporal datasets.DatasetKind A dataset that contains timestamp, ID, ingestion time, and geometry fields.
Returns
Section titled “Returns”The created dataset object.
See Queryable fields for schema constraints and Filter by custom fields for query syntax.