Adding Redshift to the Kinesis Firehose

This part is delicate as several pieces from different services must fit together:

  • The data structure, table declaration, and Kinesis Redshift configuration
  • The data fields aggregation and subsequent parsing
  • The role and associated policies

The fields of the Redshift table that stores the data need to be synchronized in three different places:

  1. The Redshift table with a proper definition of fields.
  2. The script that sends the data to Kinesis. Depending on how the record sent to Kinesis is aggregated together and later parsed by Redshift, the script must concatenate the same number of fields in the same order as the ones defined in the Redshift table. For instance, when we write record = ','.join([str(st.id) ...

Get Effective Amazon Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.