Skip to content

firehose delivery stream destination error

0

I am emitting records from lambda function using firehose.put_record_batch function. However firehose raises delivery error even though python record exactly matches the schema of the table. identifier-field-ids is set to id and python dict contains id field.

  • Error Code: Iceberg.InvalidUniqueKeys
  • Error message: The configured unique keys for the table do not match with the fields present in the schema.

asked 2 years ago545 views

1 Answer
1

The error you're encountering suggests there's a mismatch between the unique keys configured for your Iceberg table and the fields present in the data you're sending through Firehose.

Here are a few things to check:

  1. Ensure that the 'id' field in your Python dict exactly matches the name and data type of the 'id' column in your Iceberg table. Even small differences in capitalization or data type can cause this error.

  2. Verify that the 'id' field is indeed set as the identifier-field-id in your Iceberg table configuration. This setting should match exactly with what you've defined in your table schema.

  3. Check if there are any other fields set as identifier-field-ids in your Iceberg table. If there are multiple fields set as identifiers, all of them need to be present in your input data.

  4. Make sure that the 'id' field is at the top level of your JSON structure. Firehose only processes the first level of nodes in a multi-level nested JSON.

  5. If you're using a Lambda function for data transformation before it reaches Firehose, ensure that the Lambda function is not inadvertently modifying or removing the 'id' field.

  6. Double-check the Firehose configuration to ensure it's correctly set up to handle the Iceberg table format and that it's pointing to the right table in your data catalog.

If the problem persists after verifying these points, you might want to temporarily log the exact data being sent to Firehose and compare it side-by-side with your Iceberg table schema to spot any discrepancies. Also, consider checking the Firehose CloudWatch logs for any additional error details that might provide more insight into the specific cause of the mismatch.
Sources
Consideration and limitations - Amazon Data Firehose
Route incoming records to different Iceberg tables - Amazon Data Firehose

answered 2 years ago

EXPERT

reviewed 2 years ago

  • how do you add identifier-field-ids option to an existing table ? alter table add identifiers field doesn't seem to work.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.