往hudi分区表中追加数据
时间: 2023-09-14 13:11:39 浏览: 240
您可以使用Apache Hudi提供的DeltaStreamer工具将新数据追加到Hudi分区表中。以下是一个示例命令:
```
java -jar hudi-deltastreamer-xxx.jar \
--props /path/to/config/file.properties \
--schemaprovider-class org.apache.hudi.utilities.schema.FilebasedSchemaProvider \
--source-class org.apache.hudi.utilities.sources.JsonKafkaSource \
--source-ordering-field timestamp \
--target-base-path /path/to/hudi/base \
--target-table my_hudi_table \
--props /path/to/hudi/properties \
--op UPSERT \
--partition-value my_partition_value
```
其中,需要替换以下参数:
- `/path/to/config/file.properties`:DeltaStreamer配置文件的路径。
- `org.apache.hudi.utilities.sources.JsonKafkaSource`:数据源类型,可以根据自己的情况选择。
- `timestamp`:数据源中用于保证顺序性的字段名。
- `/path/to/hudi/base`:Hudi表的根路径。
- `my_hudi_table`:Hudi表的名称。
- `/path/to/hudi/properties`:Hudi表的配置文件路径。
- `UPSERT`:操作类型,可以是INSERT、UPSERT或BULK_INSERT。
- `my_partition_value`:新数据所属的分区值。
您可以根据自己的情况进行替换和调整。
阅读全文
相关推荐

















