@@ -332,6 +332,10 @@ For further information how to store catalog configurations, see [Flink's Catalo
332332:: :
333333
334334# ## Create Tables
335+ <Tabs groupId="lake-tabs">
336+ <TabItem value="paimon" label="Paimon" default>
337+
338+
335339Running the following SQL to create Fluss tables to be used in this guide :
336340` ` ` sql title="Flink SQL"
337341CREATE TABLE fluss_order (
@@ -366,6 +370,46 @@ CREATE TABLE fluss_nation (
366370);
367371```
368372
373+ </TabItem >
374+
375+ <TabItem value =" iceberg " label =" Iceberg " >
376+
377+
378+ Running the following SQL to create Fluss tables to be used in this guide:
379+ ``` sql title="Flink SQL"
380+ CREATE TABLE fluss_order (
381+ ` order_key` BIGINT ,
382+ ` cust_key` INT NOT NULL ,
383+ ` total_price` DECIMAL (15 , 2 ),
384+ ` order_date` DATE ,
385+ ` order_priority` STRING,
386+ ` clerk` STRING,
387+ ` ptime` AS PROCTIME()
388+ );
389+ ```
390+
391+ ``` sql title="Flink SQL"
392+ CREATE TABLE fluss_customer (
393+ ` cust_key` INT NOT NULL ,
394+ ` name` STRING,
395+ ` phone` STRING,
396+ ` nation_key` INT NOT NULL ,
397+ ` acctbal` DECIMAL (15 , 2 ),
398+ ` mktsegment` STRING,
399+ PRIMARY KEY (` cust_key` ) NOT ENFORCED
400+ );
401+ ```
402+
403+ ``` sql title="Flink SQL"
404+ CREATE TABLE fluss_nation (
405+ ` nation_key` INT NOT NULL ,
406+ ` name` STRING,
407+ PRIMARY KEY (` nation_key` ) NOT ENFORCED
408+ );
409+ ```
410+
411+ </TabItem >
412+ </Tabs >
369413## Streaming into Fluss
370414
371415First, run the following SQL to sync data from source tables to Fluss tables:
@@ -520,13 +564,10 @@ SELECT o.order_key,
520564 c .acctbal ,
521565 c .mktsegment ,
522566 n .name
523- FROM (
524- SELECT * , PROCTIME() as ptime
525- FROM ` default_catalog` .` default_database` .source_order
526- ) o
527- LEFT JOIN fluss_customer FOR SYSTEM_TIME AS OF o .ptime AS c
567+ FROM fluss_order o
568+ LEFT JOIN fluss_customer FOR SYSTEM_TIME AS OF ` o` .` ptime` AS ` c`
528569 ON o .cust_key = c .cust_key
529- LEFT JOIN fluss_nation FOR SYSTEM_TIME AS OF o . ptime AS n
570+ LEFT JOIN fluss_nation FOR SYSTEM_TIME AS OF ` o ` . ` ptime` AS ` n `
530571 ON c .nation_key = n .nation_key ;
531572```
532573
0 commit comments