Reputation: 77
Have three tables tbl1, tbl2 and tbl3 with primary key id2, id2 and id3 respectively. After full outer join of tbl1 and tbl2 is there way to set id3 as PK for the newly created tables.
create table tbl12 as select * from tbl1 full outer join tbl2 on tbl1.id2=tbl2.id2 emit changes;
Here im getting id2 as PK. I need to set the PK as id3 so that full outer join with tbl3 is possible.
Upvotes: 0
Views: 441
Reputation: 1355
It looks like ksqlDB uses the first table's key as the key for the output schema.
This would mean that you start your query with
create table outputTable as select * from tbl3 ...
Upvotes: 1