Is it possible to use multiple left join in Confluent KSQL query? tried to join stream with more than 1 tables , if not then whats the solution?

前端 未结 1 521
长情又很酷
长情又很酷 2021-01-22 04:08

Stream :

describe ammas;

 Field   | Type                        
-------------------------------------  
 ROWTIME | BIGINT           (system)  
 ROWKEY  | VARC         


        
1条回答
  •  再見小時候
    2021-01-22 04:11

    KSQL currently (v5.3) only supports a single join operation per statement. If you want to perform multiple joins you have to "daisy-chain" them in multiple statements, e.g.

    CREATE STREAM out1 AS 
      SELECT * FROM ammas cd 
               LEFT JOIN appat ab 
                 ON ab.id = cd.id 
    
    CREATE STREAM out_final AS 
      SELECT * FROM out1 o 
               LEFT JOIN annat aa ON o.id =cd.id;
    

    Update November 2020: ksqlDB supports multi-way joins were added in ksqlDB v0.9. Confluent Platform 6.0 includes ksqlDB 0.10.2 and therefore also includes this functionality. See the release blog and documentation for details.

    0 讨论(0)
提交回复
热议问题