Ask Your Question
3

How to handle the absence of records in a foreign-key join using Kafka Streams?

asked 2022-01-26 11:00:00 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-04-01 01:00:00 +0000

plato gravatar image

There are a few ways to handle the absence of records in a foreign-key join using Kafka Streams:

  1. Inner join: This is the default join behavior in Kafka Streams. It only outputs records that have matching keys in both streams. If a key is only present in one stream, the record is dropped.

  2. Left join: This join type outputs all records from the left stream (the one specified first) and matching records from the right stream. If there are no matching records in the right stream, the field values from the right stream will be null.

  3. Outer join: This join outputs all records from both streams, even if there are no matching keys. If there is no matching record in the right stream, the field values from the right stream will be null.

Which join type to use depends on your use case and what behavior you want to see in the output.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-01-26 11:00:00 +0000

Seen: 14 times

Last updated: Apr 01 '23