Skip to main content
Ctrl+K

Framework Repositories 1.0 documentation

  • AI
    • Baidu
      • PaddlePaddle Docker
      • PaddleOCR Docker
      • PaddleDetection Docker
      • Paddle Lite Docker
      • FastDeploy
      • VisualDL Docker
      • PaddleX
      • Baidu Comate
    • PyTorch Docker
    • TensorFlow Docker
    • Jupyter Docker
    • MLflow Docker
    • YOLO Python
    • Label Tools
    • Label Studio Docker
    • Make Sense Docker
    • Face Recognition Docker
    • InsightFace
    • ChatGPT Next Web Docker
    • IOPaint Docker
    • Ollama Docker
    • vLLM Docker
    • Open WebUI Docker
    • Chatbot Ollama Docker
    • MaxKB Docker
    • AnythingLLM Docker
    • Big-AGI Docker
    • LocalAI Docker
    • GPT4All
    • FastGPT Docker
    • One API Docker
    • Dify Docker
    • LangChain
    • Langflow Docker
    • n8n Docker
    • Flowise Docker
    • OpenClaw Docker
    • Stable Diffusion
    • ComfyUI
    • Comflowy Note
    • InvokeAI Docker
    • SearXNG Docker
    • AI Clients
    • MCP Inspector Docker
    • MCP Servers
    • Pollinations
    • Prompt Optimizer Docker
    • PDFMathTranslate Docker
    • TrWebOCR Docker
    • Neo4j Docker
    • GPT-Load Docker
    • LangBot Docker
  • Big Data
    • Apache
      • Zeppelin Docker
      • Flink Docker
      • DolphinScheduler Docker
    • Cloudera
      • Cloudera Manager Docker
    • Flume
      • Flume Introduction
      • Flume Environment
      • Flume Configuration
      • Flume Sequence Generator Source
      • Flume NetCat Source
      • Flume Fetching Twitter Data
    • Hadoop
      • Enviornment Setup
      • HDFS
      • Command Reference
      • MapReduce
      • Streaming
      • Multi-Node Cluster
      • YARN
      • Azkaban Docker
    • HBase
      • HBase Overview
      • HBase Architecture
      • HBase Installation
      • HBase Shell
      • HBase Admin API
      • HBase Table
      • HBase Client API
      • HBase Data
    • Hive
      • Hive Introduction
      • Hive Installation
      • Hive Data Types
      • Hive Database
      • Hive Table
      • Hive Partitioning
      • Hive Built-in Operators
      • Hive Built-in Functions
      • Hive View and Indexes
      • HiveQL
      • Hive vs. HBase
    • Impala
      • Impala Overview
      • Impala Environment
    • Pig
      • Pig Overview
      • Pig Architecture
      • Pig Installation
      • Pig Execution
      • Pig Grunt Shell
      • Pig Latin Basics
      • Pig Load & Store Operators
      • Pig Diagnostic Operators
      • Pig Group Operator
      • Pig Cogroup Operator
      • Pig Join Operator
      • Pig Cross Operator
      • Combining & Splitting
      • Filtering
      • Sorting
      • Pig Eval Functions
      • Pig Load & Store Functions
      • Pig Bag & Tuple Functions
      • Pig String Functions
      • Pig Date-time Functions
      • Pig Math Functions
      • Pig User Defined Functions
      • Pig Running Scripts
    • Kafka
      • Kafka Quickstart
      • Kafka Manager
    • Solr
      • Solr笔记
      • Solr网摘笔记
    • Spark
      • Spark Introduction
      • Spark RDD
      • Spark Installation
      • Spark SQL Introduction
      • Spark SQL DataFrames
      • Spark SQL Data Sources
    • Storm
      • Storm笔记
      • Storm官方文档
      • Storm网摘笔记
  • Databases
    • Cassandra
      • Cassandra Docker
      • Cassandra Nodetool
      • Cassandra-web Docker
      • Cassandra Cqlsh
    • Couchbase
      • Couchbase Docker
    • Derby Quick Start
    • Exchange
      • Debezium Docker
      • Canal Docker
      • StreamSets Data Collector Docker
      • CloudBeaver Docker
      • Slashbase
      • GreptimeDB Docker
      • Doris Docker
      • Flink CDC Doris
      • Flink CDC Oracle Doris
      • ClickHouse Docker
      • Trino Docker
      • Presto Docker
      • QuestDB Docker
      • DataX Docker
      • Chat2DB Docker
      • RethinkDB Docker
      • Camel Karavan Docker
      • Hawtio Docker
      • Kaoto Docker
      • TDengine Docker
      • DrawDB Docker
    • InfluxDB
      • InfluxDB Docker
    • Kettle
      • Kettle网摘笔记
      • webSpoon Docker
    • Memcached
      • Memcached Docker
    • MongoDB
      • MongoDB Docker
    • MySQL
      • Installation Using Binaries
      • Installation Using Yum
      • Using Option Files
      • mysqld
      • mysqld_safe
      • mysql.server
      • mysqld_multi
      • mysql_secure_installation
      • mysqldump
      • mysqlslap
      • ALTER USER Statement
      • CREATE USER Statement
      • DROP USER Statement
      • GRANT Statement
      • RENAME USER Statement
      • REVOKE Statement
      • SET PASSWORD Statement
      • InnoDB Backup and Recovery
      • MySQL Sample Database
      • MySQL Index
      • MySQL Functions
      • MySQL Date Functions
      • MySQL String Functions
      • MySQL Math Functions
      • MySQL Window Functions
      • MySQL my.cnf
      • MySQL Docker
      • phpMyAdmin Docker
      • Adminer Docker
      • Yearning Docker
      • Locks
    • Oracle
      • Oracle Docker
      • Oracle笔记 Chapter 1-2
      • Oracle笔记 Chapter 3.1-3.3
      • Oracle笔记 Chapter 3.4
      • Oracle笔记 Chapter 3.5-3.7
      • Oracle笔记 Chapter 5
      • Oracle Version Numbers
      • Oracle ORAPWD
      • Oracle Startup and Shutdown
      • Oracle TO_DATE TO_CHAR
      • Oracle Tips
    • PostgreSQL
      • PostgreSQL Tutorial
      • PostgreSQL SQL
      • PostgreSQL Master-Slave
      • pgAdmin Docker
      • TimescaleDB Docker
    • Redis
      • Redis笔记
      • Redis开发与运维笔记 Chapter 3
      • Redis开发与运维笔记 Chapter 4
      • Redis开发与运维笔记 Chapter 11
      • Redis网摘笔记
      • RedisInsight
      • Redis Docker
      • RediSearch Docker
      • Hystrix网摘笔记
      • DbGate Docker
    • SQLite
      • SQLite Docker
      • SQLite Browser Docker
    • Vector
      • Chroma Docker
      • Weaviate Docker
  • DevOps
    • Jenkins Docker
    • Jenkins LTS Docker
    • Jenkins Pipeline
    • Nexus Docker
    • Gitea Docker
    • GitLab Docker
    • Zentao Docker
    • Nacos Docker
    • Consul Docker
    • Grafana
    • Grafana Docker
    • Grafana Loki Docker
    • Prometheus Docker
    • Zipkin Docker
    • Jaeger Docker
    • Skywalking Docker
    • SonarQube Docker
    • XXL-JOB Docker
    • PowerJob Docker
    • Flowable Docker
    • Camunda Docker
    • ShowDoc Docker
    • Redmine Docker
    • Drawio Docker
    • tldraw
    • draw-a-ui
    • CAT Docker
    • Zabbix Docker
    • Zabbix JVM Docker
    • HertzBeat Docker
    • Jpom Docker
    • Graylog Docker
    • Tomcat Docker
    • Jetty Docker
    • WildFly Docker
    • Gate One Docker
    • Jira Docker
    • AdguardHome Docker
    • Pi-hole Docker
    • Cloudflare Docker
    • Heimdall Docker
    • dash. Docker
    • WireGuard Docker
    • Vaultwarden Docker
    • Unbound Docker
    • Sonic Docker
    • Teleport Docker
    • JumpServer Docker
    • 1Panel Docker
    • Halo Docker
    • MeterSphere
    • CloudExplorer Lite
    • Kasm Docker
    • Ubuntu VNC Docker
    • Wireshark Docker
    • Baota Docker
    • iRedMail Docker
    • Uptime Kuma Docker
    • Gatus Docker
    • Umami Docker
    • SafeLine Docker
    • Domain Admin Docker
    • Homebox Docker
    • IT Tools Docker
    • Matomo Docker
    • Homarr Docker
    • Speed Test Docker
    • Puter Docker
    • RSSHub Docker
    • Password Pusher Docker
    • Message Pusher Docker
    • Message Nest Docker
    • Gotify Docker
    • Dashy Docker
    • Planka Docker
    • Flow Docker
    • OCRmyPDF Docker
    • Stirling PDF Docker
    • Healthchecks Docker
  • Docker
    • ELK
      • Elasticsearch Docker
      • Logstash Docker
      • Kibana Docker
      • Docker ELK
      • Docker Compose ELK
    • Docker Installation
    • Docker Compose Installation
    • Docker Note
    • Docker Containers Evolution
    • Docker Quickstart
    • Docker One Hour
    • Docker Desktop for Windows
    • Docker Networks
    • Docker Dockerfile
    • Docker Hub
    • Docker CLI
    • Prune unused Docker objects
    • Docker Swarm
    • Docker in Docker
    • Docker Registry
    • Docker Utilities
    • Ouroboros Docker
    • Watchtower Docker
    • Diun Docker
    • Dockly Docker
    • Dozzle Docker
    • Portainer Docker
    • UI For Docker
    • Shipyard Docker
    • Dockge Docker
    • Node.js Docker
    • Rancher Docker
    • Arthas Docker
    • OpenJDK Docker
    • Theia Docker
    • Flutter Docker
    • SurveyKing Docker
    • Tabler Docker
    • OpenSearch Docker
    • Moodist Docker
    • Browserless Docker
    • Airsonic-Advanced Docker
    • Ardour Docker
    • GIMP Docker
    • Baby Buddy Docker
    • Pylon Docker
    • LazyLibrarian Docker
    • Kimai Docker
    • JetBrains License Server Docker
    • PairDrop Docker
    • wger Docker
    • Presentation Docker
    • Kubernetes
      • minikube start
      • KubePi Docker
  • Framework
    • 3D
      • Blender Docker
    • API
      • RAP2-DELOS Docker
      • YApi Docker
      • Yaade Docker
      • Kong Docker
      • Kong Dashboard Docker
      • Konga Docker
      • JANUSEC Docker
      • Apache ShenYu Docker
      • MediaWiki Docker
      • Sphinx Note
      • Sphinx Docker
      • Hexo Docker
      • Jekyll Docker
      • Docsify Docker
      • GitBook Docker
      • BookStack Docker
      • CodiMD Docker
      • HedgeDoc Docker
      • MkDocs Docker
      • StackEdit Docker
      • Cherry Markdown
      • Etherpad Docker
      • AFFiNE Docker
      • Dokuwiki Docker
      • Hugo Docker
      • Docsy Docker
      • Wiki.js Docker
      • JSON Hero Docker
      • Discuz! Q Docker
      • kkFileView Docker
      • Huntly Docker
      • Trilium Docker
      • flatnotes Docker
      • JSON Crack Docker
      • Doocs Md Docker
    • Architect
      • 系统架构设计笔记 Part 1
      • 系统架构设计笔记 Part 2
      • 系统架构设计笔记 Part 3
      • 系统架构设计笔记 Part 4
      • 分布式服务架构笔记
      • 大型网站技术架构笔记
      • 大型网站系统与Java中间件实践
    • AVS
      • EasyDarwin Docker
      • SRS Docker
      • SRS Cloud Docker
      • FFmpeg Docker
      • ZLMediaKit Docker
      • WVP-PRO Docker
      • Red5 Docker
      • OpenMeetings Docker
      • LIVE555 Docker
      • MistServer Docker
      • Frigate Docker
      • iSpy Docker
      • Kerberos Docker
      • CumulusClips Docker
      • Janus Docker
    • BI
      • Superset Docker
      • Metabase Docker
      • Hue Docker
      • DataEase Docker
      • Apache Kylin Docker
    • C4 model Note
    • Cloud Native
      • Polaris Mesh Docker
      • Sentinel Docker
      • Pulsar Docker
    • CMS
      • WordPress Docker
      • Plone Docker
      • Joomla Docker
      • OpenCms Docker
      • MCMS Docker
      • Drupal Docker
      • Wagtail Docker
      • Memos Docker
      • Moodle Docker
      • Cockpit Docker
      • Directus Docker
    • Comments
      • Remark42 Docker
      • Cusdis Docker
      • Isso Docker
    • CRM
      • Monica Docker
    • ERP
      • Odoo Docker
      • Axelor Docker
    • IoT
      • ThingsBoard Docker
      • ThingsBoard Gateway Docker
      • ThingsBoard Gateway installation from sources
      • ThingsBoard Website Docker
      • ThingsBoard Doc Docker
      • Kura Docker
      • Node-RED Docker
      • Home Assistant Docker
      • Mosquitto Docker
      • Modbus TCP Server Docker
      • IoTDB Docker
      • EMQX Docker
    • Netdisc
      • Nextcloud Docker
      • Seafile Docker
      • FileRun Docker
      • ownCloud Docker
      • ONLYOFFICE Docker
      • Pydio Cells Docker
      • Collabora Docker
      • DzzOffice Docker
      • ResourceSpace Docker
      • LibreOffice Docker
      • ZFile Docker
      • Cloudreve Docker
      • File Browser Docker
      • FileGator Docker
      • Spacedrive Docker
      • WPS Office Docker
      • ProjectSend Docker
    • PM
      • Pomodoro Technique
    • Soft Skills
    • SSO
      • CAS Docker
      • CAS Note
      • Keycloak Docker
    • Table
      • APITable Docker
      • Baserow Docker
      • NocoBase Docker
      • NocoDB Docker
      • Teable Docker
      • Undb Docker
    • Tests
      • JMeter Getting Started
  • Linux
    • Linux Note
      • Linux笔记 Chapter 1
      • Linux笔记 Chapter 2
      • Linux笔记 Chapter 3
      • Linux笔记 Chapter 4
      • Linux笔记 Chapter 5
      • Linux笔记 Chapter 6
      • Linux笔记 Chapter 7
      • Linux笔记 Chapter 8
    • Linux常用命令大全
    • Linux Clear Cache
    • Linux Cron Scheduling Task
    • Linux env
    • Linux ps command
    • Linux Boot
    • CentOS Chrony
    • CentOS Installation
    • CentOS Mail
    • CentOS Python
    • CentOS Tips
    • CentOS Tomcat
    • CentOS Docker
    • Ubuntu Docker
    • BusyBox Docker
    • Alpine Docker
    • Endlessh Docker
  • MQ
    • ActiveMQ笔记
    • ActiveMQ网摘笔记
    • ActiveMQ Cluster
    • ActiveMQ Exclusive Consumer
    • ActiveMQ Docker
    • Kafka Zookeeper Docker
    • Kafka Docker
    • Kafka Tool Docker
    • HiveMQ Docker
    • RabbitMQ Docker
  • Network
    • Netty笔记
    • Netty网摘笔记
    • Socket网络编程笔记
    • Socket网络编程网摘笔记
    • TCP Handshake
    • 从tcpdump抓包看TCP/IP协议
    • Network Collection
    • HTTP
      • Posting with HttpClient
      • HttpClient Timeout
      • Custom HTTP Header with the HttpClient
      • HttpClient Connection Management
      • HttpClient with SSL
      • HttpClient Basic Authentication
      • HttpAsyncClient Tutorial
  • Open Source
    • Books
      • 微服务架构设计模式
      • IoT变现
      • 云原生数据中台
    • Online Tools
    • Open Source Licenses
    • GitHub Security
    • GitHub GitLab
    • GitLab Pages
    • GitLab Pages Gitbook
    • Minecraft Docker
  • Proxy
    • nginx笔记
    • nginx img
    • nginx Util
    • nginx网摘笔记
    • nginx网摘笔记
    • nginx Docker
    • Nginx Proxy Manager Docker
    • nginx Location
    • nginx Statistics
    • nginx Logs
    • nginx Init Script
    • nginx Videos
    • nginx Lua
      • nginx Lua Installation
      • nginx Lua Quick Start
      • nginx Lua Redis/SSDB+Twemproxy
      • nginx Lua Dev Lib
      • nginx Lua Web HTTP service
      • nginx Lua Web Desc Page
      • nginx Lua Web Test
      • nginx Lua Flash Sale
    • FastDFS
      • FastDFS笔记
      • FastDFS单节点安装手册
      • FastDFS集群安装手册
      • 使用Spring Boot集成FastDFS
    • MinIO
      • MinIO Docker
      • MinIO Client Docker
      • MinIO Console Docker
      • MinIO Docker Swarm
      • Rclone Docker
    • HAProxy
      • HAProxy Docker
    • Traefik
      • Traefik Docker
    • PVR
      • Bazarr Docker
      • Emby Docker
      • Jackett Docker
      • Jellyfin Docker
      • Medusa Docker
      • Ombi Docker
      • Overseerr Docker
      • Plex Media Server Docker
      • Qbittorrent Docker
      • Radarr Docker
      • Readarr Docker
      • Sonarr Docker
    • Caddy Docker
    • Traffic Server Docker
    • frp Docker
    • FreeRADIUS Docker
    • Neutrino-Proxy Docker
    • Fabio Docker
    • FlareSolverr Docker
    • ZNC Docker
  • Python
    • Python Docker
    • Python Library
    • FastAPI Docker
    • Miniconda Docker
    • Portia Docker
    • Mealie Docker
    • Searx Docker
  • REST
    • Jersey Tomcat
    • Jersey Custom Logging
    • Jersey Set Cookie
    • Jersey File Download
    • Jersey File Upload
    • Jersey Multi-File Upload
    • Jersey Exception Handling
    • Jersey Gson
    • Jersey Security
    • Jersey Client API
    • Jersey Client Authentication
    • Jersey Swagger
  • RPC
    • Dubbo笔记
    • Dubbo Dependencies
    • Dubbo Maturity
    • Dubbo Protocol
    • Dubbo Zookeeper
    • Dubbo Design
    • Dubbo Implementation
    • Dubbo Impls Protocol
    • Dubbo Impls Filter
    • Dubbo Impls Registry
    • Dubbo Impls Config Center
    • Dubbo SPI
    • Dubbo Adaptive Extension
    • Dubbo Export Service
    • Dubbo Refer Service
    • Dubbo Directory
    • Dubbo Router
    • Dubbo Cluster
    • Dubbo LoadBalance
    • Dubbo Service Invoking Process
    • Dubbo Docker
    • Dubbox笔记
  • Spring
    • AOP
      • Spring AOP
      • cglib
    • Transaction
      • Distributed Transaction Deploy
      • 分布式事务解决方案笔记 Segment1
      • 分布式事务解决方案笔记 Segment2
      • 分布式事务解决方案笔记 Segment3
      • 分布式事务解决方案笔记 Segment4
      • 分布式事务解决方案笔记 Segment5
      • 分布式事务解决方案笔记 Segment6
      • 分布式事务解决方案笔记 Segment7
      • TCC Transaction Deploy
      • TCC Transaction Note
      • TCC Transaction Boot Deploy
    • Spring Security
      • Secure Spring REST API using Basic Authentication
      • Spring Security Architecture Overview
      • Spring Security Reference
      • Spring Security Configuration
      • Spring Security Filter
      • Spring Security SpringSecurityFilterChain
      • Spring Security OAuth
      • Spring Security SSO
    • Spring JMS
      • Spring Boot JMSTemplate
      • Spring Boot JMS Topic
    • Spring REST
      • Spring Swagger
    • Spring Session
      • Spring Session
      • Spring Session REST
  • Spring Boot
    • Spring Boot 1.x
      • Building RESTful Web Services
      • Exception Handling
      • Thymeleaf
      • CORS Support
      • Actuator
      • Enabling Swagger2
      • Hystrix
      • Kafka
      • Unit Test
      • Get all loaded beans
    • Spring Boot 2.x
      • Spring Boot 2 Logging
      • Spring Boot 2 REST API
      • Spring Boot 2 ResponseBodyEmitter
      • Spring Boot 2 Async
      • Spring Boot 2 Caching
      • Spring Retry
      • Spring Boot 2 Devtools
      • Spring Boot 2 JUnit
      • Spring Boot 2 H2
      • Spring Boot 2 Cache
      • Spring Boot 2 Gson
      • Spring Boot 2 AOP
      • Spring Boot 2 Security
      • Spring Boot 2 OAuth2
      • Spring Boot 2 Mail
      • Spring Boot 2 RestTemplate
      • Spring Boot 2 ShutdownHook
      • Spring Boot 2 JWT
      • Keycloak Guide
      • Keycloak Documentation
      • Keycloak Security
      • Keycloak OAuth2 PKCE
      • Keycloak MySQL Setup
    • Spring Cloud
      • Spring Cloud Alibaba
        • Spring Cloud Alibaba Sentinel
        • Spring Cloud Alibaba Nacos
        • Spring Cloud Alibaba RocketMQ
        • Spring Cloud Alibaba Dubbo
    • Spring Bean Life Cycle
    • Monitoring and management over JMX
    • Spring Boot Servlet
    • It is time - Goodbye Spring Boot 1.x!
    • Mini Program
      • API Backend
  • ZooKeeper
    • ZooKeeper笔记
    • ZooKeeper网摘笔记
    • ZooKeeper网摘笔记
    • ZooKeeper异常笔记
    • ZooKeeper Logs
    • ZooKeeper Commands
    • ZooKeeper Observers
    • ZooKeeper Management
    • ZooKeeper Docker
    • ZooKeeper Web UI Docker
    • ZooNavigator Docker
  • Show source
  • Suggest edit
  • Open issue
  • .md

Flink CDC Doris

Contents

  • Docker
  • Flink Doris Connector
    • MySQL 整库同步
    • Oracle 整库同步
    • 使用原理
  • Flink CDC
    • Streaming ELT 同步 MySQL 到 Doris
      • 通过 Flink CDC CLI 提交任务
    • Flink lib
    • Flink CDC lib
  • Runtime Environment
  • Screenshots
  • References

Flink CDC Doris#

Flink Doris Connector / Flink CDC

Docker#

  • doris.yml

  • Doris: http://localhost:8030/

  • User: root | admin / 密码为空

  • flink.yml

  • Flink: http://localhost:8081/

Flink Doris Connector#

Flink Doris Connector是通过 Flink 来读取和写入数据到 Doris 集群,同时集成了FlinkCDC,可以更便捷的对上游 MySQL 等数据库进行整库同步。

  • Flink Doris Connector 24.0.1

  • flink-sql-connector-mysql-cdc-3.5.0

  • MySQL Connector Java

#wget https://repository.apache.org/content/repositories/releases/org/apache/doris/flink-doris-connector-1.20/24.0.1/flink-doris-connector-1.20-24.0.1.jar
#wget https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-mysql-cdc/3.5.0/flink-sql-connector-mysql-cdc-3.5.0.jar
#wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.27/mysql-connector-java-8.0.27.jar
docker cp flink-doris-connector-1.20-24.0.1.jar jobmanager:/opt/flink/lib
docker cp flink-sql-connector-mysql-cdc-3.5.0.jar jobmanager:/opt/flink/lib
docker cp mysql-connector-java-8.0.27.jar jobmanager:/opt/flink/lib
docker cp flink-doris-connector-1.20-24.0.1.jar taskmanager:/opt/flink/lib
docker cp flink-sql-connector-mysql-cdc-3.5.0.jar taskmanager:/opt/flink/lib
docker cp mysql-connector-java-8.0.27.jar taskmanager:/opt/flink/lib

MySQL 整库同步#

docker exec -it jobmanager bash
bin/flink run \
    -Dexecution.checkpointing.interval=10s \
    -Dparallelism.default=1 \
    -c org.apache.doris.flink.tools.cdc.CdcTools \
    lib/flink-doris-connector-1.20-24.0.1.jar \
    mysql-sync-database \
    --database test_db \
    --mysql-conf hostname=127.0.0.1 \
    --mysql-conf port=3306 \
    --mysql-conf username=root \
    --mysql-conf password=123456 \
    --mysql-conf database-name=mysql_db \
    --including-tables "tbl1|test.*" \
    --sink-conf fenodes=127.0.0.1:8030 \
    --sink-conf username=root \
    --sink-conf password=123456 \
    --sink-conf jdbc-url=jdbc:mysql://127.0.0.1:9030 \
    --sink-conf sink.label-prefix=label \
    --table-conf replication_num=1

Oracle 整库同步#

wget https://repo1.maven.org/maven2/org/apache/flink/flink-sql-connector-oracle-cdc/3.5.0/flink-sql-connector-oracle-cdc-3.5.0.jar
wget https://repo1.maven.org/maven2/com/oracle/ojdbc/ojdbc8/19.3.0.0/ojdbc8-19.3.0.0.jar
bin/flink run \
    -Dexecution.checkpointing.interval=10s \
    -Dparallelism.default=1 \
    -c org.apache.doris.flink.tools.cdc.CdcTools \
    ./lib/flink-doris-connector-1.20-24.0.1.jar \
    oracle-sync-database \
    --database test_db \
    --oracle-conf hostname=127.0.0.1 \
    --oracle-conf port=1521 \
    --oracle-conf username=admin \
    --oracle-conf password="password" \
    --oracle-conf database-name=XE \
    --oracle-conf schema-name=ADMIN \
    --including-tables "tbl1|tbl2" \
    --sink-conf fenodes=127.0.0.1:8030 \
    --sink-conf username=root \
    --sink-conf password=\
    --sink-conf jdbc-url=jdbc:mysql://127.0.0.1:9030 \
    --sink-conf sink.label-prefix=label \
    --table-conf replication_num=1

使用原理#

https://doris.apache.org/zh-CN/assets/images/FlinkConnectorPrinciples-JDBC-Doris-7726ceb2bfe36b6d1b4e0446381d0e83.png

Flink CDC#

Flink CDC 是一个基于流的数据集成工具,旨在为用户提供一套功能更加全面的编程接口(API)。 该工具使得用户能够以 YAML 配置文件的形式,优雅地定义其 ETL(Extract, Transform, Load)流程,并协助用户自动化生成定制化的 Flink 算子并且提交 Flink 作业。

Streaming ELT 同步 MySQL 到 Doris#

通过 Flink CDC CLI 提交任务#

基于 Flink CDC 快速构建 MySQL 到 Doris 的 Streaming ELT 作业,包含整库同步、表结构变更同步和分库分表同步的功能。

  • flink-cdc-3.5.0-bin.tar.gz

  • MySQL pipeline connector 3.5.0

  • Apache Doris pipeline connector 3.5.0

docker cp flink-cdc-3.5.0-bin.tar.gz jobmanager:/tmp
docker exec -it jobmanager bash
mkdir -p /opt/flink-cdc
tar -xzvf /tmp/flink-cdc-3.5.0-bin.tar.gz -C /tmp/ && \
    mv /tmp/flink-cdc-3.5.0/* /opt/flink-cdc/ && \
    mv /opt/flink-cdc/lib/flink-cdc-dist-3.5.0.jar /opt/flink-cdc/lib/flink-cdc-dist.jar && \
    rm -rf /tmp/flink-cdc-3.5.0 /tmp/flink-cdc-3.5.0-bin.tar.gz
docker cp flink-cdc-pipeline-connector-doris-3.5.0.jar jobmanager:/opt/flink-cdc/lib
docker cp flink-cdc-pipeline-connector-mysql-3.5.0.jar jobmanager:/opt/flink-cdc/lib
docker cp mysql-connector-java-8.0.27.jar jobmanager:/opt/flink/lib

vi mysql-to-doris.yaml

source:
  type: mysql
  hostname: localhost
  port: 3306
  username: root
  password: 123456
  tables: app_db.\.*
  server-id: 5400-5404
  server-time-zone: Asia/Shanghai

sink:
  type: doris
  fenodes: 127.0.0.1:8030
  username: root
  password: ""
  table.create.properties.light_schema_change: true
  table.create.properties.replication_num: 1

pipeline:
  name: Sync MySQL Database to Doris
  parallelism: 1

其中: source 中的 tables: app_db.\.* 通过正则匹配同步 app_db 下的所有表。 sink 添加 table.create.properties.replication_num 参数是由于 Docker 镜像中只有一个 Doris BE 节点。

bash bin/flink-cdc.sh mysql-to-doris.yaml

Flink lib#

注:没有flink-doris-connector-1.20-24.0.1.jar和flink-sql-connector-mysql-cdc-3.5.0.jar

/opt/flink/lib
  flink-cep-1.20.2.jar
  flink-connector-files-1.20.2.jar
  flink-csv-1.20.2.jar
  flink-dist-1.20.2.jar
  flink-json-1.20.2.jar
  flink-scala_2.12-1.20.2.jar
  flink-table-api-java-uber-1.20.2.jar
  flink-table-planner-loader-1.20.2.jar
  flink-table-runtime-1.20.2.jar
  log4j-1.2-api-2.24.3.jar
  log4j-api-2.24.3.jar
  log4j-core-2.24.3.jar
  log4j-slf4j-impl-2.24.3.jar
  mysql-connector-java-8.0.27.jar

Flink CDC lib#

/opt/flink-cdc/lib
  flink-cdc-dist.jar
  flink-cdc-pipeline-connector-doris-3.5.0.jar
  flink-cdc-pipeline-connector-mysql-3.5.0.jar

Runtime Environment#

  • Doris 2.1

  • Flink Doris Connector 24.0.1

  • Flink 1.20

  • Flink CDC 3.5.0

Screenshots#

https://nightlies.apache.org/flink/flink-cdc-docs-release-3.5/fig/mysql-doris-tutorial/mysql-to-doris.png

https://nightlies.apache.org/flink/flink-cdc-docs-release-3.5/fig/mysql-doris-tutorial/doris-display-data.png

References#

  • Flink Doris Connector

  • Flink Doris Connector GitHub

  • Streaming ELT 同步 MySQL 到 Doris

  • Flink CDC

  • Flink CDC GitHub

  • Flink Sources 连接器

previous

Doris Docker

next

Flink CDC Oracle Doris

Contents
  • Docker
  • Flink Doris Connector
    • MySQL 整库同步
    • Oracle 整库同步
    • 使用原理
  • Flink CDC
    • Streaming ELT 同步 MySQL 到 Doris
      • 通过 Flink CDC CLI 提交任务
    • Flink lib
    • Flink CDC lib
  • Runtime Environment
  • Screenshots
  • References

By T5750

© Copyright 2026, T5750.