How can we achieve one to many relationship in KSQL?
We have ktable activity (act_id, req_id, act_desc). req_id is repeated.
we want to join it with kstream license (req_id, lic_id). license has unique req_id.
| ktable:activity |
|
kstream:license |
| act_id |
req_id |
act_desc |
|
req_id |
Lic_id |
| 1 |
101 |
aa |
|
101 |
10001 |
| 2 |
102 |
bb |
|
102 |
10002 |
| 3 |
101 |
cc |
|
|
|
| 4 |
102 |
dd |
|
|
|
expected output:
|
|
|
|
|
|
| kstream: license_activity |
|
|
| req_id |
Lic_id |
act_id |
act_desc |
|
|
| 10001 |
101 |
1 |
aa |
|
|
| 10002 |
102 |
2 |
bb |
|
|
| 10001 |
101 |
3 |
cc |
|
|
| 10002 |
102 |
4 |
dd |
|
|
How can we join license stream with activity table to get
license_activity stream as above (expected output).
Thanks.