bhasudha commented on code in PR #9952: URL: https://github.com/apache/hudi/pull/9952#discussion_r1396784871
########## website/docs/sql_ddl.md: ########## @@ -383,18 +383,57 @@ CREATE CATALOG hoodie_catalog The following is an example of creating a Flink table. Read the [Flink Quick Start](/docs/flink-quick-start-guide) guide for more examples. ```sql -CREATE TABLE hudi_table2( +CREATE TABLE hudi_table( id int, name string, price double ) WITH ( 'connector' = 'hudi', -'path' = 's3://bucket-name/hudi/', +'path' = 'file:///tmp/hudi_table', 'table.type' = 'MERGE_ON_READ' -- this creates a MERGE_ON_READ table, default is COPY_ON_WRITE ); ``` +### Create partitioned table + +The following is an example of creating a Flink partitioned table. + +```sql +CREATE TABLE hudi_table( + id BIGINT, + name STRING, + dt STRING, + hh STRING +) +PARTITIONED BY (`dt`) +WITH ( +'connector' = 'hudi', +'path' = 'file:///tmp/hudi_table', +'table.type' = 'MERGE_ON_READ' +); +``` + +### Create table with record keys and ordering fields + +The following is an example of creating a Flink table with record key and ordering field similarly to spark. + +```sql +CREATE TABLE hudi_table( + id BIGINT PRIMARY KEY NOT ENFORCED, + name STRING, + dt STRING, + hh STRING +) +PARTITIONED BY (`dt`) +WITH ( +'connector' = 'hudi', +'path' = 'file:///tmp/hudi_table', +'table.type' = 'MERGE_ON_READ', +'precombine.field' = 'hh' +); +``` + ### Alter Table Review Comment: Add syntax similar to the Spark SQL section ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
