1. CREATE TABLE sourceT (
    2. uuid varchar(20),
    3. name varchar(10),
    4. age int,
    5. ts timestamp(3),
    6. `partition` varchar(20)
    7. ) WITH (
    8. 'connector' = 'datagen',
    9. 'rows-per-second' = '1'
    10. );
    11. create table t2(
    12. uuid varchar(20),
    13. name varchar(10),
    14. age int,
    15. ts timestamp(3),
    16. `partition` varchar(20)
    17. )
    18. with (
    19. 'connector' = 'hudi',
    20. 'path' = '$HUDI_DEMO/t2', -- $HUDI_DEMO 替换成的绝对路径
    21. 'table.type' = 'MERGE_ON_READ',
    22. 'write.bucket_assign.tasks' = '2',
    23. 'write.tasks' = '2',
    24. 'hive_sync.enable' = 'true',
    25. 'hive_sync.mode' = 'hms',
    26. 'hive_sync.metastore.uris' = 'thrift://ip:9083' -- ip 替换成 HMS 的地址
    27. );
    28. insert into t2 select * from sourceT;

    参考
    hudi快速入门