{"id":120285,"date":"2026-10-31T10:48:33","date_gmt":"2026-10-31T02:48:33","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/120285.html"},"modified":"2026-10-31T10:48:33","modified_gmt":"2026-10-31T02:48:33","slug":"mysql-cdc-%e7%9b%b4%e6%8e%a5%e5%86%99%e8%bf%9b-doris-%e6%b1%87%e6%80%bb%e6%a8%a1%e5%9e%8b%ef%bc%9a%e5%90%8c%e6%ad%a5%e5%8d%b3%e6%b1%87%e6%80%bb%ef%bc%8c%e6%98%8e%e7%bb%86%e4%b8%8d%e7%94%a8%e6%90%ac","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/120285.html","title":{"rendered":"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d"},"content":{"rendered":"<h2>MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b&#xff1a;\u540c\u6b65\u5373\u6c47\u603b&#xff0c;\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d<\/h2>\n<p>\u5f88\u591a\u5b9e\u65f6\u94fe\u8def\u662f\u8fd9\u6837\u505a\u7684&#xff1a;\u5148\u628a MySQL \u660e\u7ec6\u4e00\u6761\u6761\u540c\u6b65\u5230 Doris&#xff0c;\u518d\u8d77\u4e00\u4e2a\u5b9a\u65f6\u4efb\u52a1\u505a GROUP BY&#xff0c;\u628a\u7ed3\u679c\u5199\u8fdb\u6c47\u603b\u8868\u3002<\/p>\n<p>\u94fe\u8def\u957f\u3001\u5ef6\u8fdf\u9ad8\u3001\u8fd8\u591a\u4e00\u4efd\u660e\u7ec6\u5b58\u50a8\u3002<\/p>\n<p>\u8fd9\u6b21\u6211\u4eec\u6362\u4e00\u79cd\u505a\u6cd5&#xff1a;CDC \u8fdb\u6765\u4ec0\u4e48&#xff0c;Doris \u5728\u5199\u5165\u65f6\u5c31\u76f4\u63a5\u6c47\u603b\u6389\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u4e3a\u4ec0\u4e48\u8981\u628a\u201c\u6c47\u603b\u201d\u653e\u5230\u5199\u5165\u65f6\u505a<\/h3>\n<p>\u5148\u770b\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u5b9e\u65f6\u5927\u5c4f\u9700\u6c42&#xff1a;<\/p>\n<ul>\n<li>\u6309\u300c\u65e5\u671f &#043; \u5546\u54c1\u300d\u770b\u8ba2\u5355\u4ef6\u6570\u548c\u9500\u552e\u91d1\u989d&#xff1b;<\/li>\n<li>\u6570\u636e\u8981\u51c6\u5230\u79d2&#xff0c;\u4e0d\u80fd\u7b49 T&#043;1&#xff1b;<\/li>\n<li>\u660e\u7ec6\u8868\u6bcf\u5929\u51e0\u767e\u4e07\u884c&#xff0c;\u4f46\u770b\u677f\u53ea\u5173\u5fc3\u51e0\u5341\u4e2a\u7ef4\u5ea6\u7ec4\u5408&#xff1b;<\/li>\n<li>\u6700\u597d\u522b\u518d\u7ef4\u62a4\u4e00\u5957\u5b9a\u65f6\u805a\u5408\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<p>\u4f20\u7edf\u505a\u6cd5\u5206\u4e24\u6b65&#xff1a;<\/p>\n<p>MySQL \u660e\u7ec6 \u2500\u2500CDC\u2500\u2500&gt; Doris \u660e\u7ec6\u8868 \u2500\u2500\u5b9a\u65f6 GROUP BY\u2500\u2500&gt; Doris \u6c47\u603b\u8868 \u2500\u2500&gt; \u770b\u677f<\/p>\n<p>\u95ee\u9898\u4e5f\u5f88\u660e\u663e&#xff1a;<\/p>\n<li>\u591a\u5b58\u4e00\u4efd\u660e\u7ec6&#xff1a;Doris \u91cc\u65e2\u6709\u660e\u7ec6\u53c8\u6709\u6c47\u603b&#xff0c;\u5b58\u50a8\u7ffb\u500d&#xff1b;<\/li>\n<li>\u591a\u4e00\u6bb5\u5ef6\u8fdf&#xff1a;\u6c47\u603b\u4efb\u52a1\u6ca1\u8dd1\u5b8c&#xff0c;\u770b\u677f\u5c31\u662f\u65e7\u6570\u636e&#xff1b;<\/li>\n<li>\u591a\u4e00\u5957\u4efb\u52a1&#xff1a;\u8c03\u5ea6\u3001\u8865\u507f\u3001\u53e3\u5f84\u7ef4\u62a4&#xff0c;\u90fd\u662f\u6210\u672c&#xff1b;<\/li>\n<li>\u660e\u7ec6\u8d8a\u5927\u8d8a\u6162&#xff1a;\u6bcf\u6b21\u805a\u5408\u90fd\u8981\u626b\u4e00\u904d\u65b0\u589e\u660e\u7ec6\u3002<\/li>\n<p>\u800c Doris \u7684\u805a\u5408\u6a21\u578b&#xff08;Aggregate Key&#xff09;&#xff0c;\u5929\u751f\u5c31\u662f\u4e3a\u8fd9\u4ef6\u4e8b\u51c6\u5907\u7684&#xff1a;<\/p>\n<p>MySQL \u660e\u7ec6 \u2500\u2500CDC\u2500\u2500&gt; Doris \u805a\u5408\u6a21\u578b<br \/>\n                       \u2191<br \/>\n              \u5199\u5165\u65f6\u81ea\u52a8\u6309 Key \u5408\u5e76<\/p>\n<p>\u540c\u4e00\u4e2a Key \u7684\u591a\u884c\u6570\u636e&#xff0c;\u5728\u5199\u5165\u9636\u6bb5\u5c31\u88ab SUM \/ REPLACE \u6389\u3002\u67e5\u8be2\u65f6\u770b\u5230\u7684\u5df2\u7ecf\u662f\u6c47\u603b\u7ed3\u679c&#xff0c;\u4e0d\u9700\u8981\u518d\u626b\u660e\u7ec6\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u505a\u4e00\u6b21\u5b8c\u6574\u9a8c\u8bc1&#xff1a;<\/p>\n<ul>\n<li>\u6e90\u7aef&#xff1a;MySQL 8.0&#xff0c;\u5f00\u542f ROW \u6a21\u5f0f Binlog&#xff1b;<\/li>\n<li>\u94fe\u8def&#xff1a;DataY \u7684 MySQLBinlogInput \u2192 DorisStreamLoad&#xff1b;<\/li>\n<li>\u76ee\u6807\u7aef&#xff1a;Doris 2.1&#xff0c;AGGREGATE KEY \u6c47\u603b\u6a21\u578b&#xff1b;<\/li>\n<li>\u9a8c\u8bc1\u5185\u5bb9&#xff1a;\u5168\u91cf\u5feb\u7167\u3001\u5b9e\u65f6\u589e\u91cf\u3001\u6279\u91cf\u5199\u5165&#xff0c;\u4e09\u6761\u8def\u5f84\u662f\u5426\u90fd\u80fd\u81ea\u52a8\u6c47\u603b\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e8c\u3001\u5148\u770b\u7ed3\u679c&#xff1a;1010 \u884c\u660e\u7ec6&#xff0c;Doris \u91cc\u53ea\u5269 17 \u884c<\/h3>\n<p>\u5148\u628a\u6700\u7ec8\u7ed3\u679c\u653e\u51fa\u6765\u3002<\/p>\n<p>\u6e90\u8868 MySQL order_detail&#xff1a;<\/p>\n<p>source_rows   agg_keys   source_qty   source_amount<br \/>\n1010          17         1018         105432.00<\/p>\n<p>Doris \u805a\u5408\u8868 order_agg&#xff1a;<\/p>\n<p>agg_rows   total_qty   total_amount<br \/>\n17         1018        105432.00<\/p>\n<p>1010 \u884c\u660e\u7ec6&#xff0c;\u6309\u300c\u65e5\u671f &#043; \u5546\u54c1\u300d\u805a\u5408\u540e\u53ea\u5269 17 \u884c&#xff1b;\u4ef6\u6570\u548c\u91d1\u989d\u4e0e\u6e90\u7aef\u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n<p>\u5176\u4e2d 10 \u4e2a\u6279\u91cf\u5546\u54c1&#xff0c;\u6bcf\u4e2a\u5546\u54c1\u5199\u4e86 100 \u884c&#xff0c;Doris \u91cc\u6bcf\u4e2a\u5546\u54c1\u53ea\u5269 1 \u884c&#xff1a;<\/p>\n<p>stat_date    product_id   product_name   order_cnt   sales_amount<br \/>\n2026-10-27   2001         \u6279\u91cf\u5546\u54c12001    100         9990.00<br \/>\n2026-10-27   2002         \u6279\u91cf\u5546\u54c12002    100         9990.00<br \/>\n&#8230;<br \/>\n2026-10-27   2010         \u6279\u91cf\u5546\u54c12010    100         9990.00<\/p>\n<p>\u8fd9\u5c31\u662f\u805a\u5408\u6a21\u578b\u7684\u4ef7\u503c&#xff1a;\u6c47\u603b\u4e0d\u662f\u67e5\u51fa\u6765\u7684&#xff0c;\u662f\u5199\u8fdb\u53bb\u7684\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001Doris \u805a\u5408\u6a21\u578b&#xff1a;Key \u76f8\u540c\u5c31\u81ea\u52a8\u5408\u5e76<\/h3>\n<p>\u5148\u5efa\u76ee\u6807\u8868&#xff1a;<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">DATABASE<\/span> <span class=\"token keyword\">IF<\/span> <span class=\"token operator\">NOT<\/span> <span class=\"token keyword\">EXISTS<\/span> cdc_demo<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> cdc_demo<span class=\"token punctuation\">.<\/span>order_agg <span class=\"token punctuation\">(<\/span><br \/>\n  stat_date     <span class=\"token keyword\">DATE<\/span>          <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span> <span class=\"token keyword\">COMMENT<\/span> <span class=\"token string\">&#039;\u7edf\u8ba1\u65e5\u671f&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  product_id    <span class=\"token keyword\">INT<\/span>           <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span> <span class=\"token keyword\">COMMENT<\/span> <span class=\"token string\">&#039;\u5546\u54c1ID&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  product_name  <span class=\"token keyword\">VARCHAR<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">100<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token keyword\">REPLACE<\/span>  <span class=\"token keyword\">COMMENT<\/span> <span class=\"token string\">&#039;\u5546\u54c1\u540d\u79f0&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  category      <span class=\"token keyword\">VARCHAR<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">50<\/span><span class=\"token punctuation\">)<\/span>   <span class=\"token keyword\">REPLACE<\/span>  <span class=\"token keyword\">COMMENT<\/span> <span class=\"token string\">&#039;\u54c1\u7c7b&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  order_cnt     <span class=\"token keyword\">BIGINT<\/span>        SUM <span class=\"token keyword\">DEFAULT<\/span> <span class=\"token string\">&#039;0&#039;<\/span> <span class=\"token keyword\">COMMENT<\/span> <span class=\"token string\">&#039;\u8ba2\u5355\u4ef6\u6570&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  sales_amount  <span class=\"token keyword\">DECIMAL<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">18<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span> SUM <span class=\"token keyword\">DEFAULT<\/span> <span class=\"token string\">&#039;0&#039;<\/span> <span class=\"token keyword\">COMMENT<\/span> <span class=\"token string\">&#039;\u9500\u552e\u91d1\u989d&#039;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  last_update   <span class=\"token keyword\">DATETIME<\/span>      <span class=\"token keyword\">REPLACE<\/span>  <span class=\"token keyword\">COMMENT<\/span> <span class=\"token string\">&#039;\u6700\u540e\u66f4\u65b0\u65f6\u95f4&#039;<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\nAGGREGATE <span class=\"token keyword\">KEY<\/span><span class=\"token punctuation\">(<\/span>stat_date<span class=\"token punctuation\">,<\/span> product_id<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">DISTRIBUTED<\/span> <span class=\"token keyword\">BY<\/span> <span class=\"token keyword\">HASH<\/span><span class=\"token punctuation\">(<\/span>product_id<span class=\"token punctuation\">)<\/span> BUCKETS <span class=\"token number\">3<\/span><br \/>\nPROPERTIES <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;replication_num&#039;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;1&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u4e09\u4e2a\u5173\u952e\u70b9&#xff1a;<\/p>\n<li>\n<p>AGGREGATE KEY(stat_date, product_id) \u8fd9\u4e24\u5217\u662f\u805a\u5408\u7ef4\u5ea6\u3002\u76f8\u540c\u300c\u65e5\u671f &#043; \u5546\u54c1\u300d\u7684\u884c&#xff0c;\u4f1a\u88ab\u5408\u5e76\u6210\u4e00\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>SUM \u6307\u6807\u5217\u7528 SUM\u3002\u6bcf\u6765\u4e00\u6279\u6570\u636e&#xff0c;\u5c31\u5728\u5df2\u6709\u503c\u4e0a\u7d2f\u52a0\u3002<\/p>\n<\/li>\n<li>\n<p>REPLACE \u7ef4\u5ea6\u5217\u7528 REPLACE\u3002\u540c\u4e00\u4e2a Key \u518d\u6765\u4e00\u884c\u65f6&#xff0c;\u7528\u6700\u65b0\u503c\u8986\u76d6\u65e7\u503c\u3002 \u6240\u4ee5 last_update \u4f1a\u81ea\u52a8\u4fdd\u7559\u6700\u540e\u4e00\u6b21\u53d8\u66f4\u65f6\u95f4\u3002<\/p>\n<\/li>\n<p>\u5982\u679c\u7528 DESC \u770b\u8868\u7ed3\u6784&#xff0c;\u4f1a\u770b\u5230\u6bcf\u4e2a\u975e Key \u5217\u90fd\u5e26\u7740\u805a\u5408\u65b9\u5f0f&#xff1a;<\/p>\n<p>Field          Type            Key    Extra<br \/>\nstat_date      DATE            true   NULL<br \/>\nproduct_id     INT             true   NULL<br \/>\nproduct_name   VARCHAR(100)    false  REPLACE<br \/>\ncategory       VARCHAR(50)     false  REPLACE<br \/>\norder_cnt      BIGINT          false  SUM<br \/>\nsales_amount   DECIMAL(18,2)   false  SUM<br \/>\nlast_update    DATETIME        false  REPLACE<\/p>\n<p>\u6ce8\u610f&#xff1a;\u805a\u5408\u6a21\u578b\u8981\u6c42\u5148\u5efa\u8868\u3002<\/p>\n<p>DataY \u7684 DorisStreamLoad \u652f\u6301\u76ee\u6807\u8868\u4e0d\u5b58\u5728\u65f6\u81ea\u52a8\u5efa\u8868&#xff0c;\u4f46\u81ea\u52a8\u5efa\u51fa\u6765\u7684\u662f\u6309\u6e90\u8868\u7ed3\u6784\u6620\u5c04\u7684\u666e\u901a\u6a21\u578b&#xff0c;\u4e0d\u4f1a\u81ea\u52a8\u53d8\u6210 AGGREGATE KEY\u3002\u60f3\u505a\u5199\u5165\u65f6\u6c47\u603b&#xff0c;\u76ee\u6807\u8868\u8981\u63d0\u524d\u6309\u4e1a\u52a1\u53e3\u5f84\u5efa\u597d\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u6e90\u8868\u4e0e\u6d4b\u8bd5\u6570\u636e<\/h3>\n<p>MySQL \u6e90\u8868\u4fdd\u6301\u201c\u8ba2\u5355\u6d41\u6c34\u201d\u7684\u5f62\u6001&#xff0c;\u4e00\u884c\u4ee3\u8868\u4e00\u6b21\u9500\u552e&#xff1a;<\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">DATABASE<\/span> cdc_demo <span class=\"token keyword\">DEFAULT<\/span> <span class=\"token keyword\">CHARACTER<\/span> <span class=\"token keyword\">SET<\/span> utf8mb4<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">CREATE<\/span> <span class=\"token keyword\">TABLE<\/span> cdc_demo<span class=\"token punctuation\">.<\/span>order_detail <span class=\"token punctuation\">(<\/span><br \/>\n  id            <span class=\"token keyword\">BIGINT<\/span> <span class=\"token keyword\">PRIMARY<\/span> <span class=\"token keyword\">KEY<\/span> <span class=\"token keyword\">AUTO_INCREMENT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  stat_date     <span class=\"token keyword\">DATE<\/span>          <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  product_id    <span class=\"token keyword\">INT<\/span>           <span class=\"token operator\">NOT<\/span> <span class=\"token boolean\">NULL<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  product_name  <span class=\"token keyword\">VARCHAR<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">100<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  category      <span class=\"token keyword\">VARCHAR<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">50<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  order_cnt     <span class=\"token keyword\">INT<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  sales_amount  <span class=\"token keyword\">DECIMAL<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  last_update   <span class=\"token keyword\">DATETIME<\/span><br \/>\n<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">ENGINE<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token keyword\">InnoDB<\/span> <span class=\"token keyword\">DEFAULT<\/span> <span class=\"token keyword\">CHARSET<\/span><span class=\"token operator\">&#061;<\/span>utf8mb4<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u5199\u5165 7 \u6761\u521d\u59cb\u6570\u636e&#xff1a;<\/p>\n<p><span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> order_detail<br \/>\n  <span class=\"token punctuation\">(<\/span>stat_date<span class=\"token punctuation\">,<\/span> product_id<span class=\"token punctuation\">,<\/span> product_name<span class=\"token punctuation\">,<\/span> category<span class=\"token punctuation\">,<\/span> order_cnt<span class=\"token punctuation\">,<\/span> sales_amount<span class=\"token punctuation\">,<\/span> last_update<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">VALUES<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-25&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u667a\u80fd\u97f3\u7bb1 Pro&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">399.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-25 10:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-25&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1002<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u673a\u68b0\u952e\u76d8&#039;<\/span><span class=\"token punctuation\">,<\/span>     <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">598.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-25 10:05:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-25&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u667a\u80fd\u97f3\u7bb1 Pro&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">399.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-25 11:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-25&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1003<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u624b\u51b2\u5496\u5561\u58f6&#039;<\/span><span class=\"token punctuation\">,<\/span>   <span class=\"token string\">&#039;\u5bb6\u5c45&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">267.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-25 12:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-26&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u667a\u80fd\u97f3\u7bb1 Pro&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">798.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-26 09:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-26&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1002<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u673a\u68b0\u952e\u76d8&#039;<\/span><span class=\"token punctuation\">,<\/span>     <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">299.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-26 09:30:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-26&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1003<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u624b\u51b2\u5496\u5561\u58f6&#039;<\/span><span class=\"token punctuation\">,<\/span>   <span class=\"token string\">&#039;\u5bb6\u5c45&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">178.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-26 10:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9 7 \u884c\u91cc&#xff0c;2026-10-25 &#043; 1001 \u51fa\u73b0\u4e86\u4e24\u6b21\u3002\u6e90\u7aef\u662f\u4e24\u884c&#xff0c;Doris \u91cc\u5e94\u8be5\u53ea\u5269\u4e00\u884c&#xff0c;\u4ef6\u6570\u53d8\u6210 2&#xff0c;\u91d1\u989d\u53d8\u6210 798\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u7b2c\u4e00\u4e2a\u9a8c\u8bc1\u70b9\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001DataY \u4efb\u52a1&#xff1a;\u4e00\u4e2a CDC \u8f93\u5165&#xff0c;\u4e00\u4e2a Doris \u8f93\u51fa<\/h3>\n<p>\u4efb\u52a1\u914d\u7f6e\u53ea\u7528\u4e86\u4e24\u4e2a\u7ec4\u4ef6&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;units&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string-property property\">&#034;.id&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;mysql_cdc&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;.name&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;MySQLBinlogInput&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;datasource&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string-property property\">&#034;type&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;mysql&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;url&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;jdbc:mysql:\/\/127.0.0.1:3306\/cdc_demo?useSSL&#061;false&amp;allowPublicKeyRetrieval&#061;true&amp;serverTimezone&#061;Asia\/Shanghai&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;driver&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;com.mysql.cj.jdbc.Driver&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;username&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;root&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;password&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;******&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;dbschema&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;cdc_demo&#034;<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;databaseNamePattern&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;cdc_demo&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;tableNamePattern&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;order_detail&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;serverId&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">1234<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;snapshot&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string-property property\">&#034;.id&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;doris_sink&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;.name&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;DorisStreamLoad&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;datasource&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string-property property\">&#034;type&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;Doris&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;url&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;jdbc:mysql:\/\/127.0.0.1:9030\/cdc_demo?useSSL&#061;false&amp;allowPublicKeyRetrieval&#061;true&amp;serverTimezone&#061;Asia\/Shanghai&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;driver&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;com.mysql.cj.jdbc.Driver&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;username&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;root&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;password&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;******&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;dbschema&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;cdc_demo&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string-property property\">&#034;extraParams&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n          <span class=\"token string-property property\">&#034;fe_endpoint&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;http:\/\/127.0.0.1:8030&#034;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;schema&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;cdc_demo&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;table&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;order_agg&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;model&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;insert&#034;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;connections&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span> <span class=\"token string-property property\">&#034;sourceId&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;mysql_cdc&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;targetId&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;doris_sink&#034;<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u51e0\u4e2a\u53c2\u6570\u503c\u5f97\u5355\u72ec\u8bf4&#xff1a;<\/p>\n<table>\n<tr>\u53c2\u6570\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>snapshot: true<\/td>\n<td>\u7b2c\u4e00\u6b21\u8fd0\u884c\u65f6\u5148\u8bfb\u5386\u53f2\u5168\u91cf&#xff0c;\u518d\u4ece\u5f53\u524d Binlog \u4f4d\u70b9\u63a5\u589e\u91cf<\/td>\n<\/tr>\n<tr>\n<td>databaseNamePattern<\/td>\n<td>\u53ea\u91c7\u96c6 cdc_demo \u5e93<\/td>\n<\/tr>\n<tr>\n<td>tableNamePattern<\/td>\n<td>\u53ea\u91c7\u96c6 order_detail \u8868<\/td>\n<\/tr>\n<tr>\n<td>serverId<\/td>\n<td>\u4f2a\u88c5\u6210\u4ece\u5e93\u7684 ID&#xff0c;\u540c\u4e00 MySQL \u5b9e\u4f8b\u591a\u4e2a\u4efb\u52a1\u8981\u4e92\u4e0d\u76f8\u540c<\/td>\n<\/tr>\n<tr>\n<td>fe_endpoint<\/td>\n<td>Doris FE \u7684 HTTP \u5730\u5740&#xff0c;Stream Load \u8d70\u8fd9\u4e2a\u5165\u53e3<\/td>\n<\/tr>\n<tr>\n<td>model: insert<\/td>\n<td>\u4ee5 INSERT \u8bed\u4e49\u5199\u5165&#xff1b;\u805a\u5408\u6a21\u578b\u4f1a\u81ea\u52a8\u5b8c\u6210\u5408\u5e76<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u542f\u52a8\u65b9\u5f0f&#xff1a;<\/p>\n<p><span class=\"token function\">java<\/span> <span class=\"token parameter variable\">-jar<\/span> datay-core-1.0.4-jar-with-dependencies.jar cdc-task.json<\/p>\n<p>\u65e5\u5fd7\u91cc\u4f1a\u770b\u5230\u4e24\u4e2a\u9636\u6bb5&#xff1a;<\/p>\n<p>\u5f00\u59cb\u8bfb\u53d6\u5386\u53f2\u5168\u91cf\u6570\u636e&#xff08;snapshot&#xff09;&#xff0c;\u8d77\u59cb\u4f4d\u70b9 mysql-bin.000003:6464<br \/>\n\u5386\u53f2\u5168\u91cf\u6570\u636e\u8bfb\u53d6\u5b8c\u6210&#xff0c;\u8868 cdc_demo.order_detail&#xff0c;\u5171 7 \u6761<br \/>\n\u5386\u53f2\u5168\u91cf\u6570\u636e\u8bfb\u53d6\u5b8c\u6210&#xff0c;\u542f\u52a8 CDC \u589e\u91cf\u540c\u6b65<br \/>\n\u5df2\u6210\u529f\u5199\u5165 7 \u6761\u8bb0\u5f55\u5230\u8868 order_agg<\/p>\n<p>\u6ce8\u610f\u6700\u540e\u4e00\u53e5&#xff1a;DataY \u53d1\u9001\u7684\u662f 7 \u6761\u8bb0\u5f55&#xff0c;\u4f46 Doris \u8868\u91cc\u53ea\u4f1a\u51fa\u73b0 6 \u884c\u3002\u5408\u5e76\u53d1\u751f\u5728 Doris \u7684\u5199\u5165\u8def\u5f84\u4e0a\u3002<\/p>\n<hr \/>\n<h3>\u516d\u3001\u9a8c\u8bc1\u4e00&#xff1a;\u5168\u91cf\u5feb\u7167\u4e5f\u80fd\u76f4\u63a5\u6c47\u603b<\/h3>\n<p>\u5168\u91cf\u8bfb\u5b8c&#xff0c;\u67e5 Doris&#xff1a;<\/p>\n<p><span class=\"token keyword\">SELECT<\/span> stat_date<span class=\"token punctuation\">,<\/span> product_id<span class=\"token punctuation\">,<\/span> product_name<span class=\"token punctuation\">,<\/span> category<span class=\"token punctuation\">,<\/span><br \/>\n       order_cnt<span class=\"token punctuation\">,<\/span> sales_amount<span class=\"token punctuation\">,<\/span> last_update<br \/>\n<span class=\"token keyword\">FROM<\/span> cdc_demo<span class=\"token punctuation\">.<\/span>order_agg<br \/>\n<span class=\"token keyword\">ORDER<\/span> <span class=\"token keyword\">BY<\/span> stat_date<span class=\"token punctuation\">,<\/span> product_id<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u7ed3\u679c&#xff1a;<\/p>\n<p>2026-10-25  1001  \u667a\u80fd\u97f3\u7bb1 Pro  \u6570\u7801  2   798.00   2026-10-25 11:00:00<br \/>\n2026-10-25  1002  \u673a\u68b0\u952e\u76d8      \u6570\u7801  2   598.00   2026-10-25 10:05:00<br \/>\n2026-10-25  1003  \u624b\u51b2\u5496\u5561\u58f6    \u5bb6\u5c45  3   267.00   2026-10-25 12:00:00<br \/>\n2026-10-26  1001  \u667a\u80fd\u97f3\u7bb1 Pro  \u6570\u7801  2   798.00   2026-10-26 09:00:00<br \/>\n2026-10-26  1002  \u673a\u68b0\u952e\u76d8      \u6570\u7801  1   299.00   2026-10-26 09:30:00<br \/>\n2026-10-26  1003  \u624b\u51b2\u5496\u5561\u58f6    \u5bb6\u5c45  2   178.00   2026-10-26 10:00:00<\/p>\n<p>\u5bf9\u6bd4\u6e90\u7aef 7 \u884c&#xff1a;<\/p>\n<ul>\n<li>2026-10-25 &#043; 1001 \u7684\u4e24\u6b21\u8bb0\u5f55\u5408\u5e76\u6210\u4e00\u884c&#xff1b;<\/li>\n<li>order_cnt \u4ece 1 &#043; 1 \u53d8\u6210 2&#xff1b;<\/li>\n<li>sales_amount \u4ece 399 &#043; 399 \u53d8\u6210 798&#xff1b;<\/li>\n<li>last_update \u7528 REPLACE \u4fdd\u7559\u4e86\u66f4\u665a\u7684 11:00&#xff1b;<\/li>\n<li>\u603b\u884c\u6570\u4ece 7 \u53d8\u6210 6\u3002<\/li>\n<\/ul>\n<p>\u805a\u5408\u7ed3\u679c&#xff1a;<\/p>\n<p>agg_rows   total_qty   total_amount<br \/>\n6          12          2938.00<\/p>\n<p>\u6e90\u7aef\u540c\u6837\u6309 stat_date, product_id \u805a\u5408&#xff0c;\u7ed3\u679c\u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u9a8c\u8bc1\u4e8c&#xff1a;Binlog \u589e\u91cf\u8fdb\u6765&#xff0c;\u81ea\u52a8\u7d2f\u52a0\u5230\u5df2\u6709 Key<\/h3>\n<p>\u63a5\u4e0b\u6765\u6a21\u62df\u5b9e\u65f6\u8ba2\u5355&#xff0c;\u5f80 MySQL \u518d\u63d2 3 \u884c&#xff1a;<\/p>\n<p><span class=\"token keyword\">INSERT<\/span> <span class=\"token keyword\">INTO<\/span> order_detail<br \/>\n  <span class=\"token punctuation\">(<\/span>stat_date<span class=\"token punctuation\">,<\/span> product_id<span class=\"token punctuation\">,<\/span> product_name<span class=\"token punctuation\">,<\/span> category<span class=\"token punctuation\">,<\/span> order_cnt<span class=\"token punctuation\">,<\/span> sales_amount<span class=\"token punctuation\">,<\/span> last_update<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">VALUES<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-25&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u667a\u80fd\u97f3\u7bb1 Pro&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1197.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-25 18:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-26&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1001<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u667a\u80fd\u97f3\u7bb1 Pro&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span>  <span class=\"token number\">399.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-26 20:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;2026-10-27&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1004<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;\u964d\u566a\u8033\u673a&#039;<\/span><span class=\"token punctuation\">,<\/span>     <span class=\"token string\">&#039;\u6570\u7801&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span>  <span class=\"token number\">998.00<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;2026-10-27 10:00:00&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u51e0\u79d2\u949f\u540e&#xff0c;DataY \u65e5\u5fd7\u51fa\u73b0&#xff1a;<\/p>\n<p>\u5df2\u6210\u529f\u5199\u5165 3 \u6761\u8bb0\u5f55\u5230\u8868 order_agg<br \/>\n\u7ec4\u4ef6DorisStreamLoad\u72b6\u6001\u4fdd\u5b58\u6210\u529f&#xff1a;<br \/>\n{mysql_cdc.binlogFile&#061;mysql-bin.000003, mysql_cdc.binlogPosition&#061;6711}<\/p>\n<p>\u518d\u6b21\u67e5\u8be2 Doris&#xff1a;<\/p>\n<p>2026-10-25  1001  \u667a\u80fd\u97f3\u7bb1 Pro  \u6570\u7801  5   1995.00  2026-10-25 18:00:00<br \/>\n2026-10-26  1001  \u667a\u80fd\u97f3\u7bb1 Pro  \u6570\u7801  3   1197.00  2026-10-26 20:00:00<br \/>\n2026-10-27  1004  \u964d\u566a\u8033\u673a      \u6570\u7801  2    998.00  2026-10-27 10:00:00<\/p>\n<p>\u53d1\u751f\u4e86\u4e09\u4ef6\u4e8b&#xff1a;<\/p>\n<li>2026-10-25 &#043; 1001 \u4ece 2 \u4ef6 \/ 798 \u5143 \u7d2f\u52a0\u4e3a 5 \u4ef6 \/ 1995 \u5143&#xff1b;<\/li>\n<li>2026-10-26 &#043; 1001 \u4ece 2 \u4ef6 \/ 798 \u5143 \u7d2f\u52a0\u4e3a 3 \u4ef6 \/ 1197 \u5143&#xff1b;<\/li>\n<li>2026-10-27 &#043; 1004 \u662f\u65b0\u7684 Key&#xff0c;\u76f4\u63a5\u65b0\u589e\u4e00\u884c\u3002<\/li>\n<p>\u6e90\u7aef\u6b64\u65f6 10 \u884c&#xff0c;Doris \u91cc 7 \u884c&#xff1a;<\/p>\n<p>source: 10 rows, qty 18, amount 5532.00<br \/>\ndoris :  7 rows, qty 18, amount 5532.00<\/p>\n<p>\u589e\u91cf\u8def\u5f84\u540c\u6837\u6ca1\u6709\u4e22\u6570&#xff0c;\u4e5f\u6ca1\u6709\u91cd\u590d\u7d2f\u52a0\u3002<\/p>\n<hr \/>\n<h3>\u516b\u3001\u9a8c\u8bc1\u4e09&#xff1a;1000 \u884c\u6279\u91cf\u5199\u5165&#xff0c;\u4ecd\u7136\u53ea\u7559 10 \u4e2a Key<\/h3>\n<p>\u6700\u540e\u505a\u4e00\u6b21\u6279\u91cf\u538b\u529b\u6d4b\u8bd5&#xff1a;\u4e00\u6b21\u4e8b\u52a1\u5199\u5165 1000 \u884c&#xff0c;\u8986\u76d6 10 \u4e2a\u5546\u54c1\u3002<\/p>\n<p>source_rows   source_qty   source_amount<br \/>\n1010          1018         105432.00<\/p>\n<p>DataY \u4fa7&#xff1a;<\/p>\n<p>\u5df2\u6210\u529f\u5199\u5165 1000 \u6761\u8bb0\u5f55\u5230\u8868 order_agg<\/p>\n<p>Doris \u4fa7&#xff1a;<\/p>\n<p>agg_rows   total_qty   total_amount<br \/>\n17         1018        105432.00<\/p>\n<p>1000 \u884c\u660e\u7ec6\u53ea\u4ea7\u751f 10 \u4e2a\u805a\u5408 Key&#xff0c;\u6bcf\u4e2a\u5546\u54c1\u6b63\u597d 100 \u884c&#xff1a;<\/p>\n<p>2026-10-27  2001  \u6279\u91cf\u5546\u54c12001  100  9990.00<br \/>\n2026-10-27  2002  \u6279\u91cf\u5546\u54c12002  100  9990.00<br \/>\n&#8230;<br \/>\n2026-10-27  2010  \u6279\u91cf\u5546\u54c12010  100  9990.00<\/p>\n<p>\u5230\u8fd9\u91cc&#xff0c;\u4e09\u6761\u8def\u5f84\u90fd\u9a8c\u8bc1\u5b8c\u4e86&#xff1a;<\/p>\n<table>\n<tr>\u573a\u666f\u6e90\u7aef\u884c\u6570Doris \u884c\u6570\u4ef6\u6570\u91d1\u989d<\/tr>\n<tbody>\n<tr>\n<td>\u5168\u91cf\u5feb\u7167<\/td>\n<td align=\"right\">7<\/td>\n<td align=\"right\">6<\/td>\n<td align=\"right\">12<\/td>\n<td align=\"right\">2938.00<\/td>\n<\/tr>\n<tr>\n<td>\u589e\u91cf 3 \u884c<\/td>\n<td align=\"right\">10<\/td>\n<td align=\"right\">7<\/td>\n<td align=\"right\">18<\/td>\n<td align=\"right\">5532.00<\/td>\n<\/tr>\n<tr>\n<td>\u6279\u91cf 1000 \u884c<\/td>\n<td align=\"right\">1010<\/td>\n<td align=\"right\">17<\/td>\n<td align=\"right\">1018<\/td>\n<td align=\"right\">105432.00<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6bcf\u4e00\u9636\u6bb5&#xff0c;Doris \u7684 SUM \u7ed3\u679c\u90fd\u4e0e\u6e90\u7aef GROUP BY \u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n<hr \/>\n<h3>\u4e5d\u3001\u8fd9\u6b21\u9a8c\u8bc1\u8e29\u5230\u7684\u4e09\u4e2a\u7ec6\u8282<\/h3>\n<p>\u9a8c\u8bc1\u8fc7\u7a0b\u5e76\u4e0d\u662f\u4e00\u6b21\u5c31\u8dd1\u901a\u7684&#xff0c;\u6709\u4e09\u4e2a\u7ec6\u8282\u503c\u5f97\u8bb0\u5f55\u3002<\/p>\n<h4>1. \u76ee\u6807\u8868\u5217\u540d\u8981\u5bf9\u9f50<\/h4>\n<p>\u7b2c\u4e00\u6b21\u5efa\u8868\u65f6&#xff0c;\u6e90\u8868\u53eb qty\u3001amount\u3001updated_at&#xff0c;\u76ee\u6807\u8868\u53eb order_cnt\u3001sales_amount\u3001last_update\u3002<\/p>\n<p>\u7ed3\u679c Key \u5217\u548c\u7ef4\u5ea6\u5217\u90fd\u8fdb\u53bb\u4e86&#xff0c;\u4f46\u6307\u6807\u5217\u5168\u662f 0\u3002<\/p>\n<p>\u539f\u56e0\u5f88\u7b80\u5355&#xff1a;Stream Load \u6309 JSON \u5b57\u6bb5\u540d\u627e\u76ee\u6807\u5217&#xff0c;\u540d\u5b57\u5bf9\u4e0d\u4e0a\u5c31\u53d6\u9ed8\u8ba4\u503c\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u5f0f\u6709\u4e24\u79cd&#xff1a;<\/p>\n<ul>\n<li>\u6e90\u8868\u548c\u76ee\u6807\u8868\u4f7f\u7528\u4e00\u81f4\u7684\u5217\u540d&#xff1b;<\/li>\n<li>\u6216\u8005\u5728\u4e2d\u95f4\u52a0\u4e00\u4e2a StreamSQL \u505a\u5b57\u6bb5\u6539\u540d\u3002<\/li>\n<\/ul>\n<p>\u5b9e\u65f6\u94fe\u8def\u91cc&#xff0c;\u5efa\u8bae\u628a\u8fd9\u4e00\u6b65\u56fa\u5316\u6210\u5efa\u8868\u89c4\u8303&#xff0c;\u4e0d\u8981\u9760\u201c\u5e94\u8be5\u80fd\u5bf9\u4e0a\u201d\u3002<\/p>\n<h4>2. \u805a\u5408\u6a21\u578b\u9002\u5408\u201c\u8ffd\u52a0\u201d&#xff0c;\u4e0d\u9002\u5408\u201c\u6574\u884c\u66f4\u65b0\u201d<\/h4>\n<p>\u8fd9\u6b21\u9a8c\u8bc1\u7684\u662f\u8ba2\u5355\u6d41\u6c34&#xff1a;\u6bcf\u6b21\u9500\u552e\u90fd\u662f\u65b0\u589e\u4e00\u884c&#xff0c;\u5929\u7136\u9002\u5408 SUM\u3002<\/p>\n<p>\u5982\u679c\u6e90\u8868\u4f1a\u53d1\u751f UPDATE&#xff0c;\u6bd4\u5982\u8ba2\u5355\u91d1\u989d\u88ab\u4fee\u6539&#xff0c;\u90a3\u4e48\u518d\u628a\u6574\u884c\u5199\u8fdb\u805a\u5408\u6a21\u578b\u5c31\u4f1a\u91cd\u590d\u7d2f\u52a0&#xff1a;<\/p>\n<p>\u539f\u503c 100&#xff0c;UPDATE \u540e\u8fd8\u662f 100<br \/>\n\u805a\u5408\u6a21\u578b\u518d SUM \u4e00\u6b21 \u2192 200<\/p>\n<p>\u8fd9\u7c7b\u573a\u666f\u5e94\u8be5&#xff1a;<\/p>\n<ul>\n<li>\u7528 Doris \u7684 Unique Key \u6a21\u578b\u505a\u6574\u884c\u8986\u76d6&#xff1b;<\/li>\n<li>\u6216\u8005\u628a\u66f4\u65b0\u8f6c\u6362\u6210\u201c\u51b2\u6b63 &#043; \u65b0\u589e\u201d\u4e24\u6761\u6d41\u6c34&#xff0c;\u518d\u8fdb\u5165\u805a\u5408\u6a21\u578b\u3002<\/li>\n<\/ul>\n<p>\u6a21\u578b\u9009\u578b\u6bd4\u540c\u6b65\u5de5\u5177\u66f4\u91cd\u8981\u3002 \u805a\u5408\u6a21\u578b\u4e0d\u662f\u4e07\u80fd\u7684&#xff0c;\u5b83\u9002\u5408\u7684\u662f\u201c\u53ea\u8ffd\u52a0\u3001\u6309 Key \u6c47\u603b\u201d\u7684\u4e8b\u5b9e\u6d41\u3002<\/p>\n<hr \/>\n<h3>\u5341\u3001\u4ec0\u4e48\u65f6\u5019\u8be5\u7528\u8fd9\u5957\u7ec4\u5408<\/h3>\n<p>\u6bd4\u8f83\u9002\u5408&#xff1a;<\/p>\n<ul>\n<li>\u8ba2\u5355\u3001\u652f\u4ed8\u3001\u57cb\u70b9\u3001\u65e5\u5fd7\u7b49\u8ffd\u52a0\u578b\u4e8b\u5b9e\u6d41&#xff1b;<\/li>\n<li>\u770b\u677f\u53ea\u5173\u5fc3\u56fa\u5b9a\u7ef4\u5ea6\u7684 SUM \/ COUNT \/ MAX \/ MIN&#xff1b;<\/li>\n<li>\u660e\u7ec6\u91cf\u5927&#xff0c;\u4f46\u805a\u5408\u540e\u7684 Key \u6570\u91cf\u53ef\u63a7&#xff1b;<\/li>\n<li>\u5e0c\u671b\u7701\u6389\u5b9a\u65f6\u805a\u5408\u4efb\u52a1&#xff0c;\u964d\u4f4e\u5ef6\u8fdf\u548c\u5b58\u50a8\u3002<\/li>\n<\/ul>\n<p>\u4e0d\u592a\u9002\u5408&#xff1a;<\/p>\n<ul>\n<li>\u9700\u8981\u4fdd\u7559\u6bcf\u4e00\u884c\u660e\u7ec6&#xff1b;<\/li>\n<li>\u6e90\u7aef\u9891\u7e41 UPDATE \/ DELETE&#xff1b;<\/li>\n<li>\u805a\u5408 Key \u57fa\u6570\u63a5\u8fd1\u660e\u7ec6\u884c\u6570&#xff08;\u90a3\u6837\u805a\u5408\u6ca1\u6709\u610f\u4e49&#xff09;&#xff1b;<\/li>\n<li>\u9700\u8981\u7cbe\u786e\u56de\u6eaf\u67d0\u4e00\u6761\u539f\u59cb\u8bb0\u5f55\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3>\u5341\u4e00\u3001\u5199\u5728\u6700\u540e<\/h3>\n<p>\u8fd9\u6b21\u9a8c\u8bc1\u7684\u6838\u5fc3\u7ed3\u8bba\u53ea\u6709\u4e00\u53e5\u8bdd&#xff1a;<\/p>\n<p>MySQL CDC \u8d1f\u8d23\u201c\u628a\u53d8\u5316\u9001\u8fc7\u6765\u201d&#xff0c;Doris \u805a\u5408\u6a21\u578b\u8d1f\u8d23\u201c\u5728\u843d\u5e93\u65f6\u628a\u8d26\u7b97\u597d\u201d\u3002<\/p>\n<p>DataY \u5728\u8fd9\u4e00\u94fe\u8def\u91cc\u505a\u7684\u662f\u4e09\u4ef6\u4e8b&#xff1a;<\/p>\n<li>\u7528 MySQLBinlogInput \u505a\u5168\u91cf\u5feb\u7167 &#043; Binlog \u589e\u91cf&#xff0c;\u65ad\u70b9\u53ef\u6062\u590d&#xff1b;<\/li>\n<li>\u7528 DorisStreamLoad \u8d70 Stream Load \u534f\u8bae\u6279\u91cf\u5199\u5165&#xff1b;<\/li>\n<li>\u5199\u5165\u524d\u6309\u76ee\u6807\u5217\u7c7b\u578b\u505a\u89c4\u8303\u5316&#xff0c;\u4fdd\u8bc1\u5b57\u7b26\u3001\u65e5\u671f\u3001\u6570\u503c\u4e0d\u53d8\u5f62\u3002<\/li>\n<p>\u6700\u7ec8\u6548\u679c&#xff1a;<\/p>\n<ul>\n<li>1010 \u884c\u660e\u7ec6 \u2192 17 \u884c\u6c47\u603b&#xff1b;<\/li>\n<li>\u4ef6\u6570\u3001\u91d1\u989d\u4e0e\u6e90\u7aef\u9010\u9879\u5bf9\u9f50&#xff1b;<\/li>\n<li>\u67e5\u8be2\u4fa7\u4e0d\u7528\u518d\u8dd1 GROUP BY&#xff0c;\u770b\u677f\u76f4\u63a5\u8bfb\u6c47\u603b\u8868&#xff1b;<\/li>\n<li>\u5c11\u4e00\u4efd\u660e\u7ec6\u5b58\u50a8&#xff0c;\u5c11\u4e00\u5957\u805a\u5408\u4efb\u52a1&#xff0c;\u5c11\u4e00\u6bb5 T&#043;1 \u5ef6\u8fdf\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u4f60\u7684\u5b9e\u65f6\u770b\u677f\u4e5f\u5728\u201c\u5148\u540c\u6b65\u660e\u7ec6\u3001\u518d\u5b9a\u65f6\u6c47\u603b\u201d&#xff0c;\u53ef\u4ee5\u8bd5\u8bd5\u628a\u6c47\u603b\u524d\u79fb\u5230\u5199\u5165\u9636\u6bb5\u3002<\/p>\n<p>\u5f88\u591a\u65f6\u5019&#xff0c;\u94fe\u8def\u4e0d\u662f\u4e0d\u591f\u957f&#xff0c;\u800c\u662f\u8be5\u5728\u5165\u53e3\u7b97\u7684\u8d26&#xff0c;\u88ab\u62d6\u5230\u4e86\u51fa\u53e3\u3002<\/p>\n<hr \/>\n<h3>\u5341\u4e8c\u3001\u5173\u4e8e DataY<\/h3>\n<p>\u4e0a\u9762\u8fd9\u6761\u94fe\u8def\u91cc\u7684 MySQLBinlogInput \u548c DorisStreamLoad&#xff0c;\u90fd\u6765\u81ea DataY\u3002<\/p>\n<p>DataY \u662f\u4e00\u5957\u5f00\u6e90\u3001\u8f7b\u91cf\u7684\u4e00\u4f53\u5316\u6570\u636e\u5e73\u53f0&#xff0c;\u7406\u5ff5\u5f88\u7b80\u5355&#xff1a;<\/p>\n<p>\u6570\u636e\u5e73\u53f0\u53ef\u4ee5\u5f88\u5c0f&#xff0c;\u529f\u80fd\u4e0d\u6253\u6298\u3002<\/p>\n<p>\u4f20\u7edf\u6570\u636e\u5e73\u53f0\u5f80\u5f80\u9700\u8981 Hadoop\u3001Spark\u3001Flink\u3001ClickHouse \u4e00\u6574\u5957\u7ec4\u4ef6&#xff0c;\u51e0\u5341\u53f0\u673a\u5668\u8d77\u6b65&#xff0c;\u8fd0\u7ef4\u95e8\u69db\u9ad8\u3002DataY \u9009\u62e9\u53e6\u4e00\u6761\u8def&#xff1a;<\/p>\n<ul>\n<li>\u4e00\u4e2a JAR&#xff0c;\u81ea\u7814\u6d41\u6279\u4e00\u4f53\u5904\u7406\u5f15\u64ce&#xff0c;\u62d2\u7edd\u7ec4\u4ef6\u5730\u72f1&#xff1b;<\/li>\n<li>2 \u6838 4G \u5c31\u80fd\u8dd1\u901a\u6570\u636e\u96c6\u6210 \u2192 \u6570\u636e\u5efa\u6a21 \u2192 \u6570\u636e\u5f00\u53d1 \u2192 \u4efb\u52a1\u8c03\u5ea6 \u2192 \u6570\u636e\u5e94\u7528&#xff1b;<\/li>\n<li>\u96f6\u4f9d\u8d56\u542f\u52a8&#xff0c;10 \u5206\u949f\u642d\u597d\u5f00\u53d1\u73af\u5883&#xff1b;<\/li>\n<li>\u8c03\u5ea6 master \u4e0e\u6267\u884c worker \u53ef\u5206\u53ef\u5408&#xff0c;\u5355\u673a\u548c\u96c6\u7fa4\u540c\u4e00\u5957\u4ee3\u7801&#xff1b;<\/li>\n<li>\u5185\u5d4c DuckDB \u4f5c\u4e3a\u9ad8\u6027\u80fd\u5206\u6790\u5f15\u64ce&#xff0c;\u540c\u65f6\u652f\u6301 Doris\u3001ClickHouse \u7b49\u5916\u90e8\u5206\u6790\u5f15\u64ce\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u91cc\u7684\u201c\u8f7b\u91cf\u201d\u6307\u7684\u662f\u8fd0\u884c\u8d44\u6e90\u95e8\u69db\u4f4e&#xff0c;\u4e0d\u662f\u80fd\u529b\u8f7b\u91cf\u3002<\/p>\n<p>DataY \u7531\u4e24\u5757\u7ec4\u6210&#xff1a;<\/p>\n<table>\n<tr>\u6a21\u5757\u5b9a\u4f4d\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>DataY Core<\/td>\n<td>\u6570\u636e\u96c6\u6210\u5f15\u64ce<\/td>\n<td>\u8f7b\u91cf\u3001\u53ef\u5d4c\u5165\u3001\u53ef\u6269\u5c55\u3001\u6d41\u6279\u4e00\u4f53&#xff1b;JSON \u5b9a\u4e49\u4efb\u52a1\u3001\u81ea\u52a8\u5efa\u8868\u3001CDC \u5b9e\u65f6\u540c\u6b65&#xff1b;\u53ef\u8131\u79bb Web \u72ec\u7acb\u8fd0\u884c\u6216\u5d4c\u5165 Java \u5e94\u7528<\/td>\n<\/tr>\n<tr>\n<td>DataY Web<\/td>\n<td>\u53ef\u89c6\u5316\u6570\u636e\u5e73\u53f0<\/td>\n<td>\u62d6\u62fd\u5f0f\u4efb\u52a1\u8bbe\u8ba1\u3001\u4efb\u52a1\u8c03\u5ea6\u3001\u7ef4\u5ea6\u5efa\u6a21\u3001\u6307\u6807\u7ba1\u7406\u3001\u667a\u80fd\u95ee\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u548c\u672c\u6587\u8fd9\u6761\u5b9e\u65f6\u94fe\u8def\u76f8\u5173\u7684\u80fd\u529b&#xff1a;<\/p>\n<ul>\n<li>&#x1f50c; \u591a\u6570\u636e\u6e90&#xff1a;MySQL \/ PostgreSQL \/ Oracle \/ SQL Server \/ SAP HANA \/ Doris \/ ClickHouse \/ DuckDB \u7b49\u4e8c\u5341\u4f59\u79cd\u6570\u636e\u6e90&#xff1b;<\/li>\n<li>&#x1f504; \u56db\u79cd CDC&#xff1a;MySQL Binlog\u3001PostgreSQL WAL\u3001Oracle LogMiner\u3001MongoDB Change Streams&#xff1b;<\/li>\n<li>&#x1f9e9; \u7edf\u4e00\u7ec4\u4ef6\u6a21\u578b&#xff1a;Source \/ Operator \/ Sink&#xff0c;\u6279\u6d41\u5171\u7528&#xff1b;<\/li>\n<li>&#x1f6e1;\ufe0f \u65ad\u70b9\u7eed\u4f20&#xff1a;Binlog \u4f4d\u70b9\u3001LSN\u3001SCN\u3001resumeToken \u7edf\u4e00\u6301\u4e45\u5316&#xff1b;<\/li>\n<li>&#x1f3d7;\ufe0f \u81ea\u52a8\u5efa\u8868&#xff1a;\u8de8\u5e93 DDL \u8f6c\u6362&#xff0c;\u8868\u4e0d\u5b58\u5728\u65f6\u81ea\u52a8\u521b\u5efa&#xff1b;<\/li>\n<li>&#x1f680; Doris \u6d41\u5f0f\u5199\u5165&#xff1a;\u5185\u7f6e DorisStreamLoad&#xff0c;\u652f\u6301 insert \/ delete \/ overwrite&#xff1b;<\/li>\n<li>&#x1f9ee; \u6d41\u5185\u8ba1\u7b97&#xff1a;StreamSQL\u3001Join\u3001Lookup\u3001DataTransform&#xff0c;\u540c\u6b65\u8def\u4e0a\u987a\u624b\u628a\u6570\u636e\u52a0\u5de5\u597d&#xff1b;<\/li>\n<li>\u23f0 \u4efb\u52a1\u8c03\u5ea6&#xff1a;Quartz Cron \u7cbe\u786e\u5230\u79d2&#xff0c;DAG \u62d3\u6251\u7f16\u6392&#xff0c;master\/worker \u53ef\u5206\u79bb&#xff1b;<\/li>\n<li>&#x1f916; MCP Harness&#xff1a;\u628a\u6570\u636e\u6e90\u3001\u6570\u636e\u670d\u52a1\u3001ETL \u4efb\u52a1\u3001\u6570\u636e\u6a21\u578b\u66b4\u9732\u7ed9 AI Agent&#xff0c;\u8ba9 Agent \u76f4\u63a5\u64cd\u4f5c\u5e73\u53f0\u5bf9\u8c61&#xff1b;<\/li>\n<li>&#x1f4e6; \u53ef\u5d4c\u5165&#xff1a;Core \u53ef\u4ee5\u4f5c\u4e3a Java \u5e93&#xff0c;\u5d4c\u8fdb\u4f60\u81ea\u5df1\u7684\u5e94\u7528\u3002<\/li>\n<\/ul>\n<p>\u5feb\u901f\u5f00\u59cb&#xff1a;<\/p>\n<p><span class=\"token function\">git<\/span> clone https:\/\/gitee.com\/yuyuejia\/datay.git<br \/>\n<span class=\"token builtin class-name\">cd<\/span> datay<br \/>\nmvn clean package <span class=\"token parameter variable\">-DskipTests<\/span><br \/>\n<span class=\"token function\">java<\/span> <span class=\"token parameter variable\">-jar<\/span> datay-web\/target\/*.jar <span class=\"token parameter variable\">&#8211;DATAY_AI_API_KEY<\/span><span class=\"token operator\">&#061;<\/span>sk-xxxxxxxxx<br \/>\n<span class=\"token comment\"># \u6d4f\u89c8\u5668\u6253\u5f00 http:\/\/localhost:8080&#xff0c;\u9ed8\u8ba4\u8d26\u53f7 admin\/admin<\/span><\/p>\n<p>\u4e5f\u53ef\u4ee5\u53ea\u7528 Core \u8dd1\u5355\u4e2a\u4efb\u52a1&#xff1a;<\/p>\n<p><span class=\"token function\">java<\/span> <span class=\"token parameter variable\">-jar<\/span> datay-core\/target\/datay-core-*-jar-with-dependencies.jar taskConfig.json<\/p>\n<p>\u4ea7\u54c1\u9996\u9875&#xff1a;http:\/\/datay.yuyuejia.com.cn\/ \u5728\u7ebf\u4f53\u9a8c&#xff1a;http:\/\/datay-demo.yuyuejia.com.cn\/ \u9879\u76ee\u5730\u5740&#xff1a;https:\/\/gitee.com\/yuyuejia\/datay<\/p>\n<p>DataY \u60f3\u505a\u7684&#xff0c;\u4e0d\u662f\u518d\u5806\u4e00\u5957\u5927\u6570\u636e\u7ec4\u4ef6&#xff0c;\u800c\u662f\u628a\u6570\u636e\u96c6\u6210\u3001\u5efa\u6a21\u3001\u8c03\u5ea6\u3001\u6570\u4ed3\u548c\u95ee\u6570&#xff0c;\u6536\u8fdb\u4e00\u4e2a\u8db3\u591f\u8f7b\u7684\u5e73\u53f0\u4e0a\u3002<\/p>\n<hr \/>\n<p>\u9a8c\u8bc1\u73af\u5883&#xff1a;DataY 1.0.4 \/ MySQL 8.0.46 \/ Apache Doris 2.1.0 \/ MySQL Connector\/J 8.0.33\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b&#xff1a;\u540c\u6b65\u5373\u6c47\u603b&#xff0c;\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d \u5f88\u591a\u5b9e\u65f6\u94fe\u8def\u662f\u8fd9\u6837\u505a\u7684&#xff1a;\u5148\u628a MySQL \u660e\u7ec6\u4e00\u6761\u6761\u540c\u6b65\u5230 Doris&#xff0c;\u518d\u8d77\u4e00\u4e2a\u5b9a\u65f6\u4efb\u52a1\u505a GROUP BY&#xff0c;\u628a\u7ed3\u679c\u5199\u8fdb\u6c47\u603b\u8868\u3002 \u94fe\u8def\u957f\u3001\u5ef6\u8fdf\u9ad8\u3001\u8fd8\u591a\u4e00\u4efd\u660e\u7ec6\u5b58\u50a8\u3002 \u8fd9\u6b21\u6211\u4eec\u6362\u4e00\u79cd\u505a\u6cd5&#xff1a;CDC \u8fdb\u6765\u4ec0\u4e48&#xff0c;Doris \u5728\u5199\u5165\u65f6\u5c31\u76f4\u63a5\u6c47\u603b\u6389\u3002 \u4e00\u3001\u4e3a\u4ec0\u4e48\u8981\u628a\u201c\u6c47\u603b\u201d\u653e\u5230\u5199\u5165\u65f6\u505a<br \/>\n\u5148\u770b\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u5b9e\u65f6\u5927\u5c4f<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2735,2330,801],"topic":[],"class_list":["post-120285","post","type-post","status-publish","format-standard","hentry","category-server","tag-etl","tag-2330","tag-801"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/120285.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b&#xff1a;\u540c\u6b65\u5373\u6c47\u603b&#xff0c;\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d \u5f88\u591a\u5b9e\u65f6\u94fe\u8def\u662f\u8fd9\u6837\u505a\u7684&#xff1a;\u5148\u628a MySQL \u660e\u7ec6\u4e00\u6761\u6761\u540c\u6b65\u5230 Doris&#xff0c;\u518d\u8d77\u4e00\u4e2a\u5b9a\u65f6\u4efb\u52a1\u505a GROUP BY&#xff0c;\u628a\u7ed3\u679c\u5199\u8fdb\u6c47\u603b\u8868\u3002 \u94fe\u8def\u957f\u3001\u5ef6\u8fdf\u9ad8\u3001\u8fd8\u591a\u4e00\u4efd\u660e\u7ec6\u5b58\u50a8\u3002 \u8fd9\u6b21\u6211\u4eec\u6362\u4e00\u79cd\u505a\u6cd5&#xff1a;CDC \u8fdb\u6765\u4ec0\u4e48&#xff0c;Doris \u5728\u5199\u5165\u65f6\u5c31\u76f4\u63a5\u6c47\u603b\u6389\u3002 \u4e00\u3001\u4e3a\u4ec0\u4e48\u8981\u628a\u201c\u6c47\u603b\u201d\u653e\u5230\u5199\u5165\u65f6\u505a \u5148\u770b\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u5b9e\u65f6\u5927\u5c4f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/120285.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-31T02:48:33+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120285.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/120285.html\",\"name\":\"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-31T02:48:33+00:00\",\"dateModified\":\"2026-10-31T02:48:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/120285.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/120285.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120285.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/120285.html","og_locale":"zh_CN","og_type":"article","og_title":"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b&#xff1a;\u540c\u6b65\u5373\u6c47\u603b&#xff0c;\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d \u5f88\u591a\u5b9e\u65f6\u94fe\u8def\u662f\u8fd9\u6837\u505a\u7684&#xff1a;\u5148\u628a MySQL \u660e\u7ec6\u4e00\u6761\u6761\u540c\u6b65\u5230 Doris&#xff0c;\u518d\u8d77\u4e00\u4e2a\u5b9a\u65f6\u4efb\u52a1\u505a GROUP BY&#xff0c;\u628a\u7ed3\u679c\u5199\u8fdb\u6c47\u603b\u8868\u3002 \u94fe\u8def\u957f\u3001\u5ef6\u8fdf\u9ad8\u3001\u8fd8\u591a\u4e00\u4efd\u660e\u7ec6\u5b58\u50a8\u3002 \u8fd9\u6b21\u6211\u4eec\u6362\u4e00\u79cd\u505a\u6cd5&#xff1a;CDC \u8fdb\u6765\u4ec0\u4e48&#xff0c;Doris \u5728\u5199\u5165\u65f6\u5c31\u76f4\u63a5\u6c47\u603b\u6389\u3002 \u4e00\u3001\u4e3a\u4ec0\u4e48\u8981\u628a\u201c\u6c47\u603b\u201d\u653e\u5230\u5199\u5165\u65f6\u505a \u5148\u770b\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u5b9e\u65f6\u5927\u5c4f","og_url":"https:\/\/www.wsisp.com\/helps\/120285.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-31T02:48:33+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/120285.html","url":"https:\/\/www.wsisp.com\/helps\/120285.html","name":"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-31T02:48:33+00:00","dateModified":"2026-10-31T02:48:33+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/120285.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/120285.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/120285.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"MySQL CDC \u76f4\u63a5\u5199\u8fdb Doris \u6c47\u603b\u6a21\u578b\uff1a\u540c\u6b65\u5373\u6c47\u603b\uff0c\u660e\u7ec6\u4e0d\u7528\u642c\u4e24\u904d"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=120285"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120285\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=120285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=120285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=120285"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=120285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}