Skip to main content

dataset_data_segments

Creates, updates, deletes, gets or lists a dataset_data_segments resource.

Overview

Namedataset_data_segments
TypeResource
Idaws.iotsitewise.dataset_data_segments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aliasstringThe alias of the time series. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
data_typestringThe data type of the time series. (STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT, VIDEO, ANNOTATION, JSON)
end_timestampobjectContains a timestamp with optional nanosecond granularity.
enrichmentobjectThe enrichment information for the data segment.
source_dataset_idstringThe ID of the source dataset that contains the data segment. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
start_timestampobjectContains a timestamp with optional nanosecond granularity.
time_series_idstringThe ID of the time series.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_dataset_data_segmentsselectdataset_id, workspaceName, regiondatasetVersion, maxResults, nextTokenRetrieves a paginated list of data segments associated with a dataset. Use the nextToken parameter to retrieve additional results.
batch_delete_dataset_data_segmentsexecdataset_id, region, workspaceName, deleteDataSegmentEntriesDeletes a batch of data segments from a session dataset. Deleting a data segment deletes the underlying time series data for the segment's time range.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dataset_idstringThe ID of the session dataset from which to delete data segments.
regionstringAWS region (default: us-east-1)
workspaceNamestringThe name of the workspace that contains the dataset.
datasetVersionstringThe version of the dataset to list data segments for.
maxResultsintegerThe maximum number of results to return for each paginated request. Default: 50.
nextTokenstringThe token to be used for the next set of paginated results.

SELECT examples

Retrieves a paginated list of data segments associated with a dataset. Use the nextToken parameter to retrieve additional results.

SELECT
alias,
data_type,
end_timestamp,
enrichment,
source_dataset_id,
start_timestamp,
time_series_id
FROM aws.iotsitewise.dataset_data_segments
WHERE dataset_id = '{{ dataset_id }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND region = '{{ region }}' -- required
AND datasetVersion = '{{ datasetVersion }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

Lifecycle Methods

Deletes a batch of data segments from a session dataset. Deleting a data segment deletes the underlying time series data for the segment's time range.

EXEC aws.iotsitewise.dataset_data_segments.batch_delete_dataset_data_segments
@dataset_id='{{ dataset_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"workspaceName": "{{ workspaceName }}",
"deleteDataSegmentEntries": "{{ deleteDataSegmentEntries }}",
"clientToken": "{{ clientToken }}"
}'
;