I have three ksqldb tables, whose relation is illustrated in the picture below. I must join them.
This query will result in an error:
CREATE TABLE `reviewer-email-user`
AS SELECT *
FROM USER
INNER JOIN REVIEWER ON USER.USERID = REVIEWER.USERID
INNER JOIN EMAILADDRESS ON USER.USERID = EMAILADDRESS.USERID
EMIT CHANGES;
And the error is:
Could not determine output schema for query due to error: Invalid join condition: table-table joins require to join on the primary key of the right input table. Got USER.USERID = REVIEWER.USERID
So, how do I join these three ksqldb tables? Thank you.