fuweng11 commented on code in PR #1089:
URL: https://github.com/apache/inlong-website/pull/1089#discussion_r1865181260


##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/airflow_pulsar_mysql_example.md:
##########
@@ -0,0 +1,131 @@
+---
+title: Airflow 离线同步示例
+sidebar_position:  3
+---
+在下面的内容中,将通过一个完整的示例介绍如何使用 Apache InLong 创建 Airflow 调度任务,并完成 Pulsar -> MySQL 
的离线数据同步。
+
+## 环境部署
+### 安装 InLong
+
+在开始之前,我们需要安装 InLong 的全部组件,这里提供两种方式:
+- [Docker 部署](deployment/docker.md)(推荐)
+- [Bare Metal 部署](deployment/bare_metal.md)
+
+### 添加 Connectors
+
+下载与 Flink 版本对应的 [connectors](https://inlong.apache.org/zh-CN/downloads),解压后将 
`sort-connector-jdbc-[version]-SNAPSHOT.jar` 放在 `/inlong-sort/connectors/` 目录下。
+> 当前 Apache InLong 的离线数据同步能力只支持 Flink-1.18 版本,所以请下载 1.18 版本的 connectors。、
+
+## 创建集群和数据目标
+
+### 创建集群标签
+![airflow_create_cluster_labels](img/pulsar_mysql/airflow/airflow_create_cluster_labels.png)
+
+### 注册 Pulsar 集群
+
+![airflow_create_pulsar_cluster](img/pulsar_mysql/airflow/airflow_create_pulsar_cluster.png)
+
+### 创建数据目标
+
+![airflow_create_data_target](img/pulsar_mysql/airflow/airflow_create_data_target.png)
+
+执行如下Sql语句:
+
+```mysql
+CREATE TABLE sink_table (
+    id INT AUTO_INCREMENT PRIMARY KEY,
+    name VARCHAR(255) NOT NULL,
+    create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+);
+```
+
+## Airflow 初始化
+
+### 获取初始 DAG
+
+它们可以在[Inlong](https://github.com/apache/inlong)获取。
+
+![airflow_get_DAGs](img/pulsar_mysql/airflow/airflow_get_DAGs.jpg)
+
+> Airflow 没有提供 DAG 创建的提供 API ,因此需要两个原始 
DAG。`dag_creator`用于创建离线任务,`dag_cleaner`用于定时去清理离线任务。
+
+### 创建初始 DAG
+
+首先将DAG文件放到Airflow默认的DAG目录下面,等待一段时间,Airflow调度器会去扫描该目录,并加载DAG:
+
+![airflow_original_DAG](img/pulsar_mysql/airflow/airflow_original_DAG.png)
+
+### Airflow REST API
+
+默认情况下,Airflow 会拒绝所有 REST API 请求。请参考[Airflow 
官方文档](https://airflow.apache.org/docs/apache-airflow-providers-fab/stable/auth-manager/api-authentication.html)进行配置。
+
+### Inlong Manager 配置
+
+根据配置文件要求,对配置文件进行修改,并重启 Inlong Manager 。
+
+```properties
+# Inlong Manager URL accessible by the scheduler
+schedule.engine.inlong.manager.url=http://192.168.101.2:8083
+# Management URL for Airflow
+schedule.engine.airflow.baseUrl=http://192.168.101.16:8080
+# 用于Airflow的REST API认证的用户名和密码
+schedule.engine.airflow.username=airflow
+schedule.engine.airflow.password=airflow
+# 用来保存 Inlong Manager 认证信息的 Connection
+schedule.engine.airflow.connection.id=inlong_connection
+# 两个原始DAG的id
+schedule.engine.airflow.cleaner.id=dag_cleaner
+schedule.engine.airflow.creator.id=dag_creator
+```
+
+## 离线同步任务创建
+
+### 创建同步任务
+
+![airflow_create_ynchronization_task](img/pulsar_mysql/airflow/airflow_create_ynchronization_task.png)
+
+### 创建数据流组
+![airflow_data_stream_group](img/pulsar_mysql/airflow/airflow_data_stream_group.png)
+
+### 创建数据源和数据目标
+该小节请参照: [Pulsar 到 MySQL 示例](./pulsar_mysql_example.md)
+
+### Airflow离线任务创建结果

Review Comment:
   Please optimize this title.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to