Populating EnrichedEvent.java

We are building a Java based Spring Boot app to read an Kinesis stream containing Enriched Events (populated from stream-enrich).

We have converted EnrichedEvent.scala to an equivalent EnrichedEvent.java but we’ve found that the TSV data in the enriched kinesis stream doesn’t match it perfectly.

Is there code in stream-enrich or scala-enrich-commons which we can port over to Java to deserialise the TSV data to an object?

Hi @trung,

That shouldn’t be the case. Could you show us the code snippet you’re using for extraction? Most common problem is that people rely on tsvLine.split("\t") instead of tsvLine.split("\t", -1). Another possible problem is that you might use very old Kinesis Enrich that produced fewer columns (but it should be really old, ~ end 2016)

Regardless of that, I’d recommend you to use our Scala Analytics SDK for reading enriched data. It is type-safe and battle-tested. I haven’t tried using it from Java, but Scala should be entirely compatible and maybe just add several extra dependencies.


Thanks @anton, i was able to use the Scala Analytics SDK in a java based spring boot app.

1 Like