I have created a Kinesis data stream and I'm feeding records into it that have format like this:
{
"ufo": 5,
"unicorn": 7,
"something else": 9,
}
I'm trying to write a transformation lambda that will transform above record and insert three records into Redshift. Redshift table schema is like this:
CREATE TABLE my_table(
timestamp DATETIME,
name TEXT,
count INT
) SORTKEY(timestamp);
So in essence - from single Kinesis record I need to produce three rows in Redshift.
Documentation of transformation lambda does not explain if what I am trying to achieve is possible. I already tried to wrap all payload within array before encoding but this results in processing error on Redshift end. I also tried to return multiple records with the same record-id - this results in error too.