IoTSiteWise / Client / batch_associate_data_segments_to_dataset

batch_associate_data_segments_to_dataset

IoTSiteWise.Client.batch_associate_data_segments_to_dataset(**kwargs)

Associates a batch of data segments with a curated dataset. Data segments are time-bounded slices of time series data selected from source session datasets. Data segments that belong to the same time series can’t overlap in time, regardless of which dataset they belong to.

See also: AWS API Documentation

Request Syntax

response = client.batch_associate_data_segments_to_dataset(
    datasetId='string',
    workspaceName='string',
    associateDataSegmentEntries=[
        {
            'sourceDatasetId': 'string',
            'timeSeriesId': 'string',
            'startTimestamp': {
                'timeInSeconds': 123,
                'offsetInNanos': 123
            },
            'endTimestamp': {
                'timeInSeconds': 123,
                'offsetInNanos': 123
            }
        },
    ],
    clientToken='string'
)
Parameters:
  • datasetId (string) –

    [REQUIRED]

    The ID of the curated dataset to associate data segments with.

  • workspaceName (string) –

    [REQUIRED]

    The name of the workspace that contains the dataset.

  • associateDataSegmentEntries (list) –

    [REQUIRED]

    The list of data segment entries to associate with the dataset.

    • (dict) –

      Contains information about a data segment entry to associate with a dataset.

      • sourceDatasetId (string) – [REQUIRED]

        The ID of the source dataset that contains the data segment.

      • timeSeriesId (string) – [REQUIRED]

        The ID of the time series.

      • startTimestamp (dict) – [REQUIRED]

        The nanosecond-precision start time of the data segment to associate.

        • timeInSeconds (integer) – [REQUIRED]

          The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

        • offsetInNanos (integer) –

          The nanosecond offset from timeInSeconds.

      • endTimestamp (dict) – [REQUIRED]

        The nanosecond-precision end time of the data segment to associate.

        • timeInSeconds (integer) – [REQUIRED]

          The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

        • offsetInNanos (integer) –

          The nanosecond offset from timeInSeconds.

  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure that the request is idempotent. If you retry a request that completed successfully using the same client token, the retry succeeds without performing any further actions.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'datasetId': 'string',
    'datasetVersion': 'string',
    'failedAssociations': [
        {
            'sourceDatasetId': 'string',
            'timeSeriesId': 'string',
            'startTimestamp': {
                'timeInSeconds': 123,
                'offsetInNanos': 123
            },
            'endTimestamp': {
                'timeInSeconds': 123,
                'offsetInNanos': 123
            },
            'errorCode': 'INTERNAL_FAILURE'|'VALIDATION_ERROR'|'RESOURCE_NOT_FOUND'|'LIMIT_EXCEEDED'|'CONFLICTING_OPERATION',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • datasetId (string) –

      The ID of the dataset.

    • datasetVersion (string) –

      The version of the dataset after association.

    • failedAssociations (list) –

      A list of data segment associations that failed.

      • (dict) –

        Contains error information for a data segment association that failed.

        • sourceDatasetId (string) –

          The ID of the source dataset.

        • timeSeriesId (string) –

          The ID of the time series.

        • startTimestamp (dict) –

          The nanosecond-precision start time of the data segment.

          • timeInSeconds (integer) –

            The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

          • offsetInNanos (integer) –

            The nanosecond offset from timeInSeconds.

        • endTimestamp (dict) –

          The nanosecond-precision end time of the data segment.

          • timeInSeconds (integer) –

            The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

          • offsetInNanos (integer) –

            The nanosecond offset from timeInSeconds.

        • errorCode (string) –

          The error code for the failed association.

        • errorMessage (string) –

          The error message for the failed association.

Exceptions

  • IoTSiteWise.Client.exceptions.InvalidRequestException

  • IoTSiteWise.Client.exceptions.ResourceNotFoundException

  • IoTSiteWise.Client.exceptions.InternalFailureException

  • IoTSiteWise.Client.exceptions.ThrottlingException

  • IoTSiteWise.Client.exceptions.LimitExceededException

  • IoTSiteWise.Client.exceptions.ConflictingOperationException