A dataset represents a projection container for data points. They do not carry any info of their own. Datasets represent a set of data points from a particular data source. A data point can be found in more than one dataset.
For a list of methods for this resource, see the end of this page.
Resource representations
{ "minStartTimeNs": long, "maxEndTimeNs": long, "dataSourceId": string, "point": [ { "startTimeNanos": long, "endTimeNanos": long, "dataTypeName": string, "originDataSourceId": string, "value": [ { "intVal": integer, "fpVal": double, "stringVal": string, "mapVal": [ { "key": string, "value": { "fpVal": double } } ] } ], "modifiedTimeMillis": long, "rawTimestampNanos": long, "computationTimeMillis": long } ], "nextPageToken": string }
Property name | Value | Description | Notes |
---|---|---|---|
dataSourceId |
string |
The data stream ID of the data source that created the points in this dataset. | |
maxEndTimeNs |
long |
The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the second part of the dataset identifier. | |
minStartTimeNs |
long |
The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier. | |
nextPageToken |
string |
This token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset. | |
point[] |
list |
A partial list of data points contained in the dataset, ordered by endTimeNanos. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response. | |
point[].computationTimeMillis |
long |
DO NOT USE THIS FIELD. It is ignored, and not stored. | |
point[].dataTypeName |
string |
The data type defining the format of the values in this data point. | |
point[].endTimeNanos |
long |
The end time of the interval represented by this data point, in nanoseconds since epoch. | |
point[].modifiedTimeMillis |
long |
Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data. | |
point[].originDataSourceId |
string |
If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally. WARNING: do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent. |
|
point[].rawTimestampNanos |
long |
The raw timestamp from the original SensorEvent. | |
point[].startTimeNanos |
long |
The start time of the interval represented by this data point, in nanoseconds since epoch. | |
point[].value[] |
list |
Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in the data type specified in a data source. Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field. |
|
point[].value[].fpVal |
double |
Floating point value. When this is set, other values must not be set. | |
point[].value[].intVal |
integer |
Integer value. When this is set, other values must not be set. | |
point[].value[].mapVal[] |
list |
Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys should be kept small whenever possible. Data streams with large keys and high data frequency may be down sampled. | |
point[].value[].mapVal[].key |
string |
||
point[].value[].mapVal[].value |
nested object |
||
point[].value[].mapVal[].value.fpVal |
double |
Floating point value. | |
point[].value[].stringVal |
string |
String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and high data frequency may be down sampled. |
Methods
- delete
- Performs an inclusive delete of all data points whose start and end times
have any overlap with the time range specified by the dataset ID. For most
data types, the entire data point will be deleted. For data types where the
time span represents a consistent value (such as
com.google.activity.segment
), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted. - get
- Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time.
- patch
- Adds data points to a dataset. The dataset need not be previously created.
All points within the given dataset will be returned with subsquent calls
to retrieve this dataset. Data points can belong to more than one dataset.
This method does not use patch semantics: the data points provided are merely inserted, with no existing data replaced.