flink cdc 2.2.0 flink 1.13.6有发现数据丢失的情况 怎么解决?

flink cdc 2.2.0 flink 1.13.6有发现数据丢失的情况 劳烦敢问一下有没有什么解决方案呢?

展开
收起
wenti 2023-02-13 14:29:53 187 分享 版权
1 条回答
写回答
取消 提交回答
  • If you are using Flink-CDC 2.3 to synchronize data from a source table with a "datetime" column type to Apache Hive, and the column type is changed to "long" in Hive, there are a few solutions you can consider to resolve the issue: 1 Cast the data: In Hive, you can cast the "long" data back to the "datetime" type using the cast() function in a SELECT statement. For example: SELECT cast(column_name as timestamp) as column_name ... 2 Modify the Flink-CDC configuration: You can modify the Flink-CDC configuration to explicitly specify the target column type in Hive as "datetime". This can be done by setting the "target.column.types" property in the Flink-CDC configuration file. 3 Use a data conversion tool: You can use a data conversion tool, such as Apache NiFi, to convert the data from "long" to "datetime" as it is being loaded into Hive. It is recommended to test any changes to the configuration or data conversion process thoroughly before implementing in a production environment to ensure that the data is correctly synchronized between the source and target systems.——该回答整理自钉群“Flink CDC 社区”

    2023-02-13 19:34:26
    赞同 展开评论

实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。

收录在圈子:
实时计算 Flink 版(Alibaba Cloud Realtime Compute for Apache Flink,Powered by Ververica)是阿里云基于 Apache Flink 构建的企业级、高性能实时大数据处理系统,由 Apache Flink 创始团队官方出品,拥有全球统一商业化品牌,完全兼容开源 Flink API,提供丰富的企业级增值功能。
还有其他疑问?
咨询AI助理