跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 各位,我又来求 star 了, mysql2ch,一个同步 MySQL 到 Clickhouse 的工具
未分類
13 5 月 2020

各位,我又来求 star 了, mysql2ch,一个同步 MySQL 到 Clickhouse 的工具

各位,我又来求 star 了, mysql2ch,一个同步 MySQL 到 Clickhouse 的工具

資深大佬 : long2ice 6

距第一版发布已经过去两三个月,经过不断完善,mysql2ch 已经发布 0.4.0 版本了~

特性

  • 支持全量同步与增量同步。
  • 支持 DDL 与 DML,当前支持 DDL 字段新增与删除,支持所有的 DML,增删改全部可以同步。
  • 丰富的配置项。

依赖

  • kafka,缓冲 MySQL binlog 的消息队列。
  • redis,缓存 MySQL binlog position 与 file 。

用法

全量同步

$ mysql2ch etl -h  usage: mysql2ch etl [-h] --schema SCHEMA [--tables TABLES] [--renew]  optional arguments:   -h, --help       show this help message and exit   --schema SCHEMA  Schema to full etl.   --tables TABLES  Tables to full etl,multiple tables split with comma,default read from environment.   --renew          Etl after try to drop the target tables.  

监听 binlog

$ mysql2ch produce 

消费消息并插入 ClickHouse

$ mysql2ch consume -h  usage: mysql2ch consume [-h] --schema SCHEMA [--skip-error] [--auto-offset-reset AUTO_OFFSET_RESET]  optional arguments:   -h, --help            show this help message and exit   --schema SCHEMA       Schema to consume.   --skip-error          Skip error rows.   --auto-offset-reset AUTO_OFFSET_RESET                         Kafka auto offset reset,default earliest. 

项目地址

https://github.com/long2ice/mysql2ch,求个 star~

大佬有話說 (3)

  • 資深大佬 : azkaban

    已 star,clone 下来研究一下

  • 主 資深大佬 : long2ice

    @azkaban 感谢~

  • 資深大佬 : walker2laok

    star, 正好借此研究一番…

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具