{
  "format": "datay-etl-task",
  "version": "1.0",
  "task": {
    "taskName": "MySQL 大数据量表全量同步",
    "taskCode": "tmpl_mysql_bigtable_to_mysql",
    "taskDesc": "面向大数据量表的分区全量同步：先生成按主键分区的查询 SQL，再并行读取并覆盖写入目标表。适合百万级以上单表迁移，导入后按需调整分区数与并行度。",
    "dir": "/集成模板",
    "type": "ETL",
    "cron": "",
    "retryCount": 0,
    "timeoutSeconds": 0,
    "priority": 2,
    "project": "template",
    "nodes": [
      {
        "label": "生成分区查询 SQL",
        "code": "n1",
        "desc": "按主键把大表拆成 4 个分区查询",
        "type": "GenerateTableSelectSql",
        "config": {
          "sourceId": "tmpl-mysql-source",
          "schema": "source",
          "table": "big_table",
          "enablePartition": true,
          "partitionCount": 4
        },
        "xAxis": "120",
        "yAxis": "160",
        "status": "0"
      },
      {
        "label": "执行分区查询",
        "code": "n2",
        "desc": "执行上游生成的 SELECT 语句，留空表示使用上游 SQL",
        "type": "SqlInput",
        "config": {
          "sourceId": "tmpl-mysql-source",
          "schema": "source",
          "sql": ""
        },
        "xAxis": "420",
        "yAxis": "160",
        "status": "0"
      },
      {
        "label": "写入 MySQL 目标表",
        "code": "n3",
        "desc": "覆盖写入模板-MySQL目标库 target.big_table",
        "type": "StreamJdbcOutput",
        "config": {
          "sourceId": "tmpl-mysql-target",
          "schema": "target",
          "table": "big_table",
          "model": "overwrite"
        },
        "xAxis": "720",
        "yAxis": "160",
        "status": "0"
      }
    ],
    "edges": [
      {
        "name": "",
        "code": "e1",
        "source": "n1",
        "target": "n2",
        "config": null,
        "status": "0"
      },
      {
        "name": "",
        "code": "e2",
        "source": "n2",
        "target": "n3",
        "config": null,
        "status": "0"
      }
    ]
  },
  "references": {
    "dataSources": [
      {
        "oldId": "tmpl-mysql-source",
        "name": "模板-MySQL源库",
        "type": "MYSQL",
        "url": "jdbc:mysql://127.0.0.1:3306/source?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai"
      },
      {
        "oldId": "tmpl-mysql-target",
        "name": "模板-MySQL目标库",
        "type": "MYSQL",
        "url": "jdbc:mysql://127.0.0.1:3306/target?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai"
      }
    ],
    "models": []
  }
}
