GithubHelp home page GithubHelp logo

whisperapart / ortimysql Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 99 KB

realtiming-Sync Oracle dynamic table to mysql, with python and kafka

Python 100.00%
python kafka realtime data-synchronization daemonize oracle

ortimysql's Introduction

Oracle Real TIme to MYSQL

description

  • A daemon program for realtime-synchronizing from oracle to mysql
  • Python/ Kafka / oracle / mysql / realtime data sync
  • Supports dynamic/custom table/columns with different data types
  • Write convert rules in JDConvert.py

中文表述

  • Oracle 数据实时同步至 Mysql
  • 实现不同表不同字段不同类型的映射
  • 启动为守护进程
  • 需要自定义转换规则

usage

 # python o2m.py
Usage: python filename.py [option]
	 start 		start daemon
	 stop 		stop daemon
	 restart 	restart
	 status 	check status
	 forceInit 	redo queue
  • optional run syncInit.py to send all oracle table-data into kafka
 # python syncInit.py 
Usage: python syncInit.py [option] <table_name>
	 forceDrop 		Force to DROP MySQL Table
	 insertAll 		Insert all rows from oracle to kafka
  • optional run util_compile.py to get a executable release
 # python util_compile.py

environments

items Source Destination
IP 192.168.1.88 192.168.1.157
User oracle root
DB Oracle 11.2 MySQL5.7
OGG OGG 12.1.2.1.0 for 11.2 OGG bd 12.3.2.1.1
Kafka - Kafka_2.11-2.4.0

python 3.7.7:

 # wget -c https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz
 # tar -zxvf python-3.7.7.tgz
 # cd python-3.7.7
 # mkdir -p /usr/local/python3
 # ./configure --prefix=/usr/local/python3
 # make && make install
 # ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3
 # ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3
 # python3 -V
 # pip3 --version

tables

Map Type Oracle(Source) MySql(Destination)
normal USER_INFO user_info
normal USER_LOGIN user_login
normal MANAG_USER manag_user
normal UPMS_ORGANIZATION upms_organization
normal UPMS_USER_ORGANIZATION upms_user_organization
dynamic T_FIELD_VALUE_USER t_project_info
dynamic T_FIELD_VALUE_USER t_user_intellectual
dynamic T_FIELD_VALUE_USER t_user_financial

ortimysql's People

Contributors

whisperapart avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.