当前位置:网站首页>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;
边栏推荐
- 【励志】复盘的重要性
- Google Earth Engine APP——实现ui.Select() 的设定和条件判断
- What is the terminal privilege management
- VSCode学习资料
- 遍历Map的四种方法
- Jina 实例秀|基于神经搜索的网络安全威胁检测(一)
- The difference between Mysql application log time and system time is eight hours
- LVS-DR集群部署
- Graphical Hands-on Tutorial--ESP32 One-Key Network Configuration (Smartconfig, Airkiss)
- OD-Model【5】:YOLOv1
猜你喜欢
随机推荐
知其然,知其所以然,JS 对象创建与继承
图文手把手教程--ESP32 MQTT对接EMQX本地服务器(VSCODE+ESP-IDF)
二叉树与堆
深度学习100例 —— 卷积神经网络(CNN)天气识别
zabbix deployment
JDBC知识点
[代码阅读] CycleGAN: Unpaired Image-To-Image Translation Using Cycle-Consistent Adversarial Networks
Graphic and text hands-on tutorial--ESP32 MQTT docking EMQX local server (VSCODE+ESP-IDF)
【励志】复盘的重要性
ArrayList和LinkedList的区别
STM32入门开发 制作红外线遥控器(智能居家-万能遥控器)
mae,mse,rmse分别利用sklearn和numpy实现
移动端 开源低代码工具 beeware 和 kivy
HTB-Sense
Digital management insight into retail and e-commerce operations - retail password
线程必备内容
Camunda整体架构和相关概念
Business collocations
Heap Sort
MySQL:完整性约束和 表的设计原则


![[论文阅读] Unpaired Image-to-Image Translation Using Adversarial Consistency Loss](/img/4d/9c2f94f475834771f6ad6ffe8f8b35.png)





