当前位置:网站首页>datax oracle to oracle incremental synchronization
datax oracle to oracle incremental synchronization
2022-08-04 10:43:00 【51CTO】
关于增量更新
DataX 支持多种数据库的读写, json 格式配置文件很容易编写, 同步性能很好, 通常可以达到每秒钟 1 万条记录或者更高, 可以说是相当优秀的产品, 但是缺乏对增量更新的内置支持.
其实增量更新非常简单, 只要从目标数据库读取一个最大值的记录, 可能是 DateTime 或者 RowVersion 类型, Then filter the tables to be synchronized in the source database based on this maximum value, 然后再进行同步即可.
由于 DataX 支持多种数据库的读写, A relatively simple and reliable way of thinking is:
1.利用 DataX 的 DataReader 去目标数据库读取一个最大值;
2.将这个最大值用 TextFileWriter 写入到一个 CSV 文件;
3.用 Shell 脚本来读取 CSV 文件, 并动态修改全部同步的配置文件;
4.执行修改后的配置文件, 进行增量同步.
5.将shell脚本加入crontab命令中
源端数据库192.168.56.100,目标端192.168.56.113
要实现增量更新, 首先要 oraclereader 从目标数据库读取最大日期, 并用 TextFileWriter 写入到一个 csv 文件,
Incremental synchronization using scripts
insert into t1 values(to_timestamp(‘2021-10-22 15:23:23.123456’,’yyyy-mm-dd hh24:mi:ss.ff’));
select to_char(update_time,’yyyy-MM-dd hh24:mi:ss’) from t1;
边栏推荐
- 热成像测温的原理是什么呢?你知道吗?
- 微信小程序自定义组件-城市选择「建议收藏」
- 《迁移学习导论》第2版,升级内容抢先看!
- SkiaSharp 之 WPF 自绘 粒子花园(案例版)
- iMeta | Baidu certification is completed, search "iMeta" directly to the publisher's homepage and submission link
- Google Earth Engine APP ——制作上传GIF动图并添加全球矢量位置
- 【Inspirational】The importance of review
- MATLAB程序设计与应用 3.2 矩阵变换
- STM32前言知识总结
- Difference between ArrayList and LinkedList
猜你喜欢

Camunda overall architecture and related concepts

学会使用set和map的基本接口

iMeta | German National Cancer Center Gu Zuguang published a complex heatmap visualization method

Maple 2022 software installation package download and installation tutorial

数据化管理洞悉零售及电子商务运营——零售密码

Use pytest hook function to realize automatic test result push enterprise WeChat

解析treeSet集合进行自定义类的排序

Rust 入门指南 (用 WASM 开发第一个 Web 页面)

Events in August | 51CTO's 17th Anniversary Celebration, post a blog post to get gifts such as tea sets/notebooks/T-shirts!

广东对小鹏/广汽丰田开展网络安全检查
随机推荐
Use pytest hook function to realize automatic test result push enterprise WeChat
再次搞定 Ali 云函数计算 FC
关于ARM2440中断源个数的一点想法[通俗易懂]
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三
Super Learning Method
语音社交app源码——具备哪些开发优势?
Camunda整体架构和相关概念
RL78开发环境
Graphical Hands-on Tutorial--ESP32 One-Key Network Configuration (Smartconfig, Airkiss)
MySQL核心SQL:结构化查询语句SQL、库操作、表操作、CRUD
自己实现一个枚举validation校验器
HTB-Nibbles
onlyoffice设置跟踪变化trackChanges默认为对自己启动
mysql进阶(二十六)MySQL 索引类型
2万字50张图玩转Flink面试体系
微信小程序自定义组件-城市选择「建议收藏」
Business collocations
Google Earth Engine APP ——制作上传GIF动图并添加全球矢量位置
双向带头循环链表实现
tp5+微信小程序 分片上传