TimestreamWrite / Client / exceptions / RejectedRecordsException
RejectedRecordsException#
- class TimestreamWrite.Client.exceptions.RejectedRecordsException#
WriteRecords would throw this exception in the following cases:
Records with duplicate data where there are multiple records with the same dimensions, timestamps, and measure names but:
Measure values are different
Version is not present in the request or the value of version in the new record is equal to or lower than the existing value
In this case, if Timestream rejects data, the
ExistingVersion
field in theRejectedRecords
response will indicate the current record’s version. To force an update, you can resend the request with a version for the record set to a value greater than theExistingVersion
.Records with timestamps that lie outside the retention duration of the memory store.
Records with dimensions or measures that exceed the Timestream defined limits.
For more information, see Quotas in the Amazon Timestream Developer Guide.
Example
try: ... except client.exceptions.RejectedRecordsException as e: print(e.response)
- response#
The parsed error response. All exceptions have a top level
Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.Syntax
{ 'Message': 'string', 'RejectedRecords': [ { 'RecordIndex': 123, 'Reason': 'string', 'ExistingVersion': 123 }, ], 'Error': { 'Code': 'string', 'Message': 'string' } }
Structure
(dict) –
WriteRecords would throw this exception in the following cases:
Records with duplicate data where there are multiple records with the same dimensions, timestamps, and measure names but:
Measure values are different
Version is not present in the request or the value of version in the new record is equal to or lower than the existing value
In this case, if Timestream rejects data, the
ExistingVersion
field in theRejectedRecords
response will indicate the current record’s version. To force an update, you can resend the request with a version for the record set to a value greater than theExistingVersion
.Records with timestamps that lie outside the retention duration of the memory store.
Records with dimensions or measures that exceed the Timestream defined limits.
For more information, see Quotas in the Amazon Timestream Developer Guide.
Message (string) –
RejectedRecords (list) –
(dict) –
Represents records that were not successfully inserted into Timestream due to data validation issues that must be resolved before reinserting time-series data into the system.
RecordIndex (integer) –
The index of the record in the input request for WriteRecords. Indexes begin with 0.
Reason (string) –
The reason why a record was not successfully inserted into Timestream. Possible causes of failure include:
Records with duplicate data where there are multiple records with the same dimensions, timestamps, and measure names but:
Measure values are different
Version is not present in the request, or the value of version in the new record is equal to or lower than the existing value
If Timestream rejects data for this case, the
ExistingVersion
field in theRejectedRecords
response will indicate the current record’s version. To force an update, you can resend the request with a version for the record set to a value greater than theExistingVersion
.Records with timestamps that lie outside the retention duration of the memory store.
Note
When the retention window is updated, you will receive a
RejectedRecords
exception if you immediately try to ingest data within the new window. To avoid aRejectedRecords
exception, wait until the duration of the new window to ingest new data. For further information, see Best Practices for Configuring Timestream and the explanation of how storage works in Timestream.Records with dimensions or measures that exceed the Timestream defined limits.
For more information, see Access Management in the Timestream Developer Guide.
ExistingVersion (integer) –
The existing version of the record. This value is populated in scenarios where an identical record exists with a higher version than the version in the write request.
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.