[Demo] Use 3 line SQL achieve syncing MySQL to Elasticsearch #1378
Unanswered
leonardBang
asked this question in
Demo
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
三行 SQL 实现 单品实时累计排行榜
1. 下载 docker-compose.yml 文件, 通过 docker-compose up -d 启动容器,第一次会下载镜像比较慢,之后会很快
2. 下载 Flink 1.14 和对应的 SQL connector jar
3. 构造 MySQL 表测试数据
docker-compose exec mysql mysql -uroot -p123456
4. Flink CDC 实时读取MySQL数据并写入Elasticsearch
5. 读取 Elasticsearch中的数据做可视化呈现
首先访问 http://localhost:5601/app/kibana#/management/kibana/index_pattern 创建 index: top_products.
然后就可以在 http://localhost:5601/app/kibana#/discover 看到写入的数据了.
在 MySQL 订单表中继续下单,观察 Kibana 仪表盘中数据变化:
Beta Was this translation helpful? Give feedback.
All reactions