Skip to main content
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

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 custom fields in the dataset schema.
[]datasets.DatasetOption
Options for dataset metadata.

Options

Set a short dataset summary.
Set the dataset’s markdown description.

Field options

Make the field available for server-side custom field filters. Choose queryable fields before ingesting datapoints.

Dataset kinds

datasets.DatasetKind
A dataset that contains timestamp, ID, and ingestion time fields.
datasets.DatasetKind
A dataset that contains timestamp, ID, ingestion time, and geometry fields.

Returns

The created dataset object.
See Queryable fields for schema constraints and Filter by custom fields for query syntax.