You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Ethan Guo (Jira)" <ji...@apache.org> on 2023/02/16 07:16:00 UTC

[jira] [Closed] (HUDI-5331) Add schema settings with stream api

     [ https://issues.apache.org/jira/browse/HUDI-5331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ethan Guo closed HUDI-5331.
---------------------------
    Resolution: Fixed

> Add schema settings with stream api
> -----------------------------------
>
>                 Key: HUDI-5331
>                 URL: https://issues.apache.org/jira/browse/HUDI-5331
>             Project: Apache Hudi
>          Issue Type: Improvement
>            Reporter: chao he
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.13.0
>
>
> When using stream api with flink, you need to use '.column()' to set each column, eg:
> {code:java}
> HoodiePipeline.Builder builder = HoodiePipeline.builder(targetTable)
>     .column("uuid VARCHAR(20)")
>     .column("name VARCHAR(10)")
>     .column("age INT")
>     .column("ts TIMESTAMP(3)")
>     .column("`partition` VARCHAR(20)")
>     .pk("uuid")
>     .partition("partition")
>     .options(options); {code}
> After improvement, you can use the '.schema()' method, no longer need to set each column, eg:
>  
> {code:java}
> HoodiePipeline.Builder builder = HoodiePipeline.builder(targetTable)
>     .schema(table.schema)
>     .pk("uuid")
>     .partition("partition")
>     .options(options);  {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)