{"id":108136,"date":"2026-09-21T01:12:28","date_gmt":"2026-09-20T17:12:28","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/108136.html"},"modified":"2026-09-21T01:12:28","modified_gmt":"2026-09-20T17:12:28","slug":"%e6%95%b0%e6%8d%ae%e4%bb%93%e5%ba%93-%e7%9a%84%e4%bb%8b%e7%bb%8d%e5%92%8c%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/108136.html","title":{"rendered":"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528"},"content":{"rendered":"<h3 id=\"7a3a97f7\">\u6570\u636e\u4ed3\u5e93\u4ecb\u7ecd<\/h3>\n<p>\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e&#xff0c;\u62bd\u53d6\u5230\u4e00\u4e2a\u5927\u7684\u6570\u636e\u5e93(\u6570\u636e\u4ed3\u5e93)&#xff0c;\u76f8\u5f53\u4e8e\u53ef\u4ee5\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u7684\u6570\u636e\u6574\u5408\u5230\u4e00\u8d77&#xff0c;\u7136\u540e\u5bf9\u5176\u4e2d\u7684\u6570\u636e\u8fdb\u884c\u52a0\u5de5\u5206\u6790\u5904\u7406&#xff0c;\u4e5f\u65b9\u4fbf\u540e\u7eed\u5173\u8054\u67e5\u8be2\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;\u5982\u679c\u6709\u7684\u4e1a\u52a1\u9700\u8981\u67e5\u8be2\u4e24\u4e2a\u4e0d\u540c\u7684\u4e1a\u52a1\u5e93&#xff0c;\u6ca1\u6709\u6570\u636e\u4ed3\u5e93\u8fd9\u4e2a\u4e2d\u8f6c\u7ad9&#xff0c;\u662f\u529e\u4e0d\u5230\u7684\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"451\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171224-6ab013f8e06e6.png\" width=\"643\" \/><\/p>\n<h3>\u6570\u636e\u4ed3\u5e93\u67b6\u6784<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"868\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171225-6ab013f95d419.png\" width=\"1380\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"584\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171225-6ab013f9cff93.png\" width=\"663\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"522\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171226-6ab013fa157af.png\" width=\"1215\" \/><\/p>\n<h3 id=\"6fe484a1\">\u6570\u636e\u4ed3\u5e93\u5206\u5c42<\/h3>\n<p>1\u3001\u6e05\u6670\u7684\u6570\u636e\u7ed3\u6784&#xff1a;\u6bcf\u4e00\u5c42\u7684\u4f5c\u7528\u4e0d\u4e00\u6837&#xff0c;\u76ee\u7684\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5b9a\u4f4d\u548c\u7406\u89e3\u6570\u636e<br \/>\n2\u3001\u65b9\u4fbf\u6570\u636e\u8840\u7f18\u8ffd\u8e2a&#xff0c;\u51cf\u5c11\u91cd\u590d\u6027\u7684\u5f00\u53d1&#xff1a;\u4e09\u4e2a\u4e0d\u540c\u7684\u9700\u6c42&#xff0c;\u90fd\u9700\u8981\u4ece5\u5f20\u8868\u83b7\u53d6\u6570\u636e&#xff0c;\u90fd\u9700\u6c42\u8fdb\u884c\u6e05\u6d17\u548c\u8f6c\u6362\u3002<br \/>\n3\u3001\u628a\u590d\u6742\u95ee\u9898\u7b80\u5355\u5316<br \/>\n4\u3001\u7ef4\u62a4\u65b9\u4fbf<\/p>\n<p id=\"u2772a8a8\">ODS\u5c42&#xff1a;Operate data store&#xff0c;\u8d34\u6e90\u5c42(\u539f\u59cb\u6570\u636e\u5c42)<\/p>\n<p>\u6570\u636e\u6765\u6e90&#xff1a;\u4e1a\u52a1\u5e93&#xff0c;\u57cb\u70b9\u6570\u636e&#xff0c;\u6d88\u606f\u961f\u5217\u3001\u63a5\u53e3\u6570\u636e<\/p>\n<p>\u5efa\u8bbe\u65b9\u5f0f&#xff1a;<br \/>\n1\u3001\u4e0e\u4e1a\u52a1\u5e93\u8868\u7ed3\u6784\u4e00\u81f4&#xff0c;\u4e00\u822c\u60c5\u51b5\u4e0b\u4f1a\u5728\u539f\u4e1a\u52a1\u5e93\u8868\u540d\u524d\u9762\u6dfb\u52a0\u5e93\u524d\u7f00&#xff0c;\u6216\u81ea\u5b9a\u4e49\u524d\u7f00\u3002<br \/>\n2\u3001\u76f4\u63a5\u91c7\u96c6\u4e1a\u52a1\u6570\u636e&#xff0c;\u4e0d\u505a\u8f6c\u6362\u5904\u7406&#xff0c;\u6570\u636e\u4fdd\u7559\u65f6\u95f4\u6839\u636e\u4e1a\u52a1\u5177\u4f53\u786e\u5b9a\u3002<br \/>\n3\u3001\u5168\u91cf\u91c7\u96c6&#xff0c;\u7b2c\u4e8c\u5929\u518d\u6b21\u5168\u91cf\u91c7\u96c6&#xff0c;\u524d\u4e00\u5929\u7684\u6570\u636e\u4e0d\u4fdd\u7559\u3002\u5927\u8868\u4f18\u5316\u53ef\u505a\u589e\u91cf\u3002<\/p>\n<p>Dim\u5c42: Dimension \u7ef4\u5ea6\u5c42<\/p>\n<p>DIM&#xff08;Dimension&#xff09;\u5c42\u662f\u6570\u636e\u4ed3\u5e93\u7684\u5173\u952e\u7ec4\u6210\u90e8\u5206\u4e4b\u4e00&#xff0c;\u5b83\u4e3b\u8981\u8d1f\u8d23\u5b58\u50a8\u7ef4\u5ea6\u6570\u636e\u548c\u89c4\u5219&#xff0c;\u4f7f\u6570\u636e\u4ed3\u5e93\u4e2d\u7684\u6570\u636e\u66f4\u6613\u4e8e\u7406\u89e3\u548c\u5206\u6790\u3002<\/p>\n<p id=\"ua79dd1c0\">DWD\u5c42&#xff1a;Data WareHouse Detail \u6570\u636e\u660e\u7ec6\u5c42<\/p>\n<p>\u6570\u636e\u6765\u6e90&#xff1a;ODS<br \/>\n\u5efa\u8bbe\u65b9\u5f0f&#xff1a;\u6839\u636eODS\u5c42\u6570\u636e\u6309\u4e3b\u9898\u6027\u8fdb\u884c\u5f52\u7c7b\u5efa\u6a21\u3002<br \/>\nDWD&#xff0c;\u4e3b\u8981\u662f\u5c06\u4ece\u4e1a\u52a1\u6570\u636e\u5e93\u4e2d\u540c\u6b65\u8fc7\u6765\u7684ODS\u5c42\u6570\u636e\u8fdb\u884c\u6e05\u6d17\u548c\u6574\u5408\u6210\u76f8\u5e94\u7684\u4e8b\u5b9e\u8868\u3002\u4e8b\u5b9e\u8868\u4f5c\u4e3a\u6570\u636e\u4ed3\u5e93\u7ef4\u5ea6\u5efa\u6a21\u7684\u6838\u5fc3&#xff0c;\u9700\u8981\u7d27\u7d27\u56f4\u7ed5\u7740\u4e1a\u52a1\u8fc7\u7a0b\u6765\u8bbe\u8ba1\u3002\u5728\u62ff\u5230\u4e1a\u52a1\u7cfb\u7edf\u7684\u8868\u7ed3\u6784\u540e&#xff0c;\u8fdb\u884c\u5927\u6982\u7684\u68b3\u7406&#xff0c;\u518d\u4e0e\u4e1a\u52a1\u65b9\u6c9f\u901a\u6574\u4e2a\u4e1a\u52a1\u8fc7\u7a0b\u7684\u6d41\u8f6c\u8fc7\u7a0b&#xff0c;\u5bf9\u4e1a\u52a1\u7684\u6574\u4e2a\u751f\u547d\u5468\u671f\u8fdb\u884c\u5206\u6790&#xff0c;\u660e\u786e\u5173\u952e\u7684\u4e1a\u52a1\u6b65\u9aa4&#xff0c;\u5728\u80fd\u6ee1\u8db3\u4e1a\u52a1\u9700\u6c42\u7684\u524d\u63d0\u4e0b&#xff0c;\u5c3d\u53ef\u80fd\u8bbe\u8ba1\u51fa\u66f4\u901a\u7528\u7684\u6a21\u578b\u3002<\/p>\n<p>\u56db\u4e2a\u57fa\u672c\u6982\u5ff5&#xff1a;\u7ef4\u5ea6&#xff0c;\u4e8b\u5b9e&#xff0c;\u6307\u6807&#xff08;\u5ea6\u91cf&#xff09;&#xff0c;\u7c92\u5ea6\u3002\u00a0<br \/>\n\u5ba2\u6237\u6ce8\u518c\u4e8b\u5b9e\u8868&#xff1a;\u4e00\u6761\u5ba2\u6237\u6ce8\u518c\u8bb0\u5f55\u5c31\u662f\u4e00\u4e2a\u4e8b\u5b9e&#xff0c;\u6307\u6807&#xff0c;\u5ba2\u6237\u6ce8\u518c\u91cf\u3002<\/p>\n<p id=\"u81643658\">DWS\u5c42&#xff1a;Data WareHouse Servce \u6570\u636e\u670d\u52a1\u5c42(\u6570\u636e\u6c47\u603b\u5c42)<\/p>\n<p>\u6570\u636e\u6765\u6e90&#xff1a;DWD\u3001Dim<\/p>\n<p>\u5bf9\u660e\u7ec6\u6570\u636e\u8fdb\u884c\u9884\u52a0\u5de5&#xff0c;\u6c47\u603b&#xff0c;\u4e0e\u5173\u8054&#xff0c;\u5efa\u7acb\u591a\u7ef4\u7acb\u65b9\u4f53\u7684\u6570\u636e\u91cf&#xff0c;\u63d0\u9ad8\u67e5\u8be2\u6548\u7387\u3002<\/p>\n<p id=\"u48da75ed\">ADS\u5c42&#xff1a;Application Data Store \u6570\u636e\u5e94\u7528\u5c42<\/p>\n<p>\u670d\u52a1\u4e8e\u7ec8\u7aef\u7528\u6237&#xff0c;\u9ad8\u5ea6\u6c47\u603b\u3002<\/p>\n<p>DWD&#xff1a;\u4e00\u5f20\u4e8b\u5b9e\u8868\u670920\u4e2a\u7ef4\u5ea6&#xff0c;5\u4e2a\u6307\u6807&#xff0c;DWS\u5c42\u5c31\u53ef\u80fd&#xff1a;10\u4e2a\u7ef4\u5ea6&#xff0c;5\u4e2a\u6307\u6807&#xff0c;APP\u5c42&#xff1a;3\u4e2a\u7ef4\u5ea6&#xff0c;5\u4e2a\u6307\u6807&#xff0c;<\/p>\n<p id=\"uc8f69b3e\">\u6211\u4eec\u8fd9\u4e2a\u9879\u76ee\u4f7f\u7528\u7684\u662f \u7ef4\u5ea6\u5efa\u6a21<\/p>\n<p id=\"udb1c59dd\">\u7ef4\u5ea6\u5efa\u6a21&#xff1a; \u6240\u6709\u7684\u8868\u5206\u4e3a\u4e24\u7c7b 1\u3001\u4e8b\u5b9e\u8868 2\u3001\u7ef4\u5ea6\u8868<\/p>\n<p id=\"u7db640f5\">ods \u3001dwd\u3001dws\u3001ads \u4e00\u822c\u5b58\u653e\u7684\u90fd\u662f\u4e8b\u5b9e\u8868<\/p>\n<p id=\"u3534be18\">dim \u4e00\u822c\u5b58\u653e\u7684\u90fd\u662f\u7ef4\u5ea6\u8868<\/p>\n<h3>\u6570\u636e\u4ed3\u5e93\u5efa\u8868\u89c4\u8303<\/h3>\n<p id=\"u9c7ae283\">\u6570\u636e\u4ed3\u5e93\u5efa\u8868\u547d\u540d\u89c4\u8303<\/p>\n<table>\n<tr>\u5206\u5c42\u89c4\u8303\u4e3e\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>ODS<\/td>\n<td>ods_&lt;\u6e90\u7cfb\u7edf&gt;_&lt;\u6e90\u8868\u540d&gt;<\/td>\n<td>ods_erp_ekko\u3001ods_mysql_order<\/td>\n<\/tr>\n<tr>\n<td>DIM<\/td>\n<td>dim_&lt;\u5b9e\u4f53&gt;<\/td>\n<td>dim_date\u3001dim_shop\u3001dim_product<\/td>\n<\/tr>\n<tr>\n<td>DWD<\/td>\n<td>dwd_&lt;\u4e3b\u9898&gt;_&lt;\u4e1a\u52a1\u8fc7\u7a0b&gt;<\/td>\n<td>dwd_trade_order_detail\u3001dwd_user_login<\/td>\n<\/tr>\n<tr>\n<td>DWS<\/td>\n<td>dws_&lt;\u4e3b\u9898&gt;_&lt;\u7edf\u8ba1\u7ef4\u5ea6&gt;_&lt;\u5468\u671f&gt;<\/td>\n<td>dws_trade_user_1d\u3001dws_trade_shop_30d<\/td>\n<\/tr>\n<tr>\n<td>ADS<\/td>\n<td>ads_&lt;\u4e3b\u9898&gt;_&lt;\u4e1a\u52a1\u573a\u666f&gt;<\/td>\n<td>\n<p>ads_trade_gmv_report\u3001ads_trade_shop_rank_daily<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\u5206\u5c42\u8bf4\u660e&#xff1a;\u5404\u5c42\u7684\u5b9a\u4f4d\u4e0e\u7279\u5f81&#xff08;ODS \u4e0d\u6539\u540d\u3001DIM \u4e0d\u5e26\u5468\u671f\u3001DWD \u4e0d\u805a\u5408\u3001DWS \u5468\u671f\u5fc5\u586b\u3001ADS \u4e00\u8868\u4e00\u573a\u666f&#xff09;<\/li>\n<li>\u901a\u7528\u94c1\u5f8b&#xff1a;\u5168\u5c0f\u5199\u3001\u4e0b\u5212\u7ebf\u5206\u8bcd\u3001\u907f\u5f00\u4fdd\u7559\u5b57\u7b49<\/li>\n<li>\u5468\u671f\u540e\u7f00\u7ea6\u5b9a&#xff1a;_1d\/_7d\/_30d\/_td\/<\/li>\n<\/ul>\n<p>dws_trade_user_1d \u00a0 \u00a0\u2192 \u4eca\u5929\u4ea4\u6613\u989d \u00a0 \u00a0 \u00a0&#xff08;\u65e5\u62a5\u7528&#xff09;<br \/>\ndws_trade_user_7d \u00a0 \u00a0\u2192 \u8fd17\u5929\u4ea4\u6613\u989d \u00a0 \u00a0 &#xff08;\u5468\u62a5\u7528&#xff09;<br \/>\ndws_trade_user_30d \u00a0 \u2192 \u8fd130\u5929\u4ea4\u6613\u989d \u00a0 \u00a0&#xff08;\u6708\u62a5\u7528&#xff09;<br \/>\ndws_trade_user_td\u00a0 \u00a0 \u00a0\u00a0\u2192 \u7d2f\u8ba1\u4ea4\u6613\u989d \u00a0 \u00a0 \u00a0&#xff08;\u7528\u6237\u4e3b\u9875\u7528&#xff09;<\/p>\n<p id=\"u1a949f77\">\u5b57\u6bb5\u5b9a\u4e49\u539f\u5219<\/p>\n<p>\u76f8\u540c\u7684\u6570\u636e\u5c5e\u6027&#xff0c;\u5982\u679c\u5728\u4e0d\u540c\u7684\u8868\u4e2d\u51fa\u73b0&#xff0c;\u5219\u5e94\u91c7\u53d6\u76f8\u540c\u7684\u5b57\u6bb5\u540d\u3001\u6570\u636e\u7c7b\u578b\u3001\u6570\u636e\u957f\u5ea6&#xff0c;\u6570\u636e\u7cbe\u5ea6&#xff1b;\u00a0<br \/>\nuname \u4e0d\u7ba1\u5728\u54ea\u4e2a\u8868\u53ea\u8981\u51fa\u73b0\u7528\u6237\u540d \u00a0\u5fc5\u987b\u90fd\u53eb\u505auname<br \/>\n\u6570\u5b57\u7c7b\u578b\u7684\u6570\u636e\u5fc5\u987b\u4e3a\u6574\u6570\u6216\u6d6e\u70b9\u6570&#xff0c;\u91d1\u989d\u7c7b\u578b\u6570\u636e\u5fc5\u987b\u4e3a\u6d6e\u70b9\u6570\u00a0<br \/>\n\u65e5\u671f\u7c7b\u578b\u7684\u6570\u636e&#xff1a;\u540c\u4e00\u4e2a\u5b57\u6bb5\u7684\u503c\u5176\u683c\u5f0f\u5fc5\u987b\u7edf\u4e00 \u00a0YYYY-MM-DD YYYY\/MM\/DD\u00a0<br \/>\n\u5b57\u6bb5\u547d\u540d&#xff1a;\u8981\u4e48\u90fd\u662f\u82f1\u6587&#xff0c;\u8981\u4e48\u90fd\u662f\u4e2d\u6587\u62fc\u97f3\u7f29\u5199\u3002<\/p>\n<h3>ods\u5c42\u6570\u636e\u5f00\u53d1<\/h3>\n<p id=\"u25a2d354\">ods &#xff1a; \u539f\u59cb\u6570\u636e\u5c42&#xff0c;\u8d34\u6e90\u5c42<\/p>\n<p id=\"u28101878\">\u6570\u636e\u6765\u6e90\u662f\u4e09\u65b9\u9762\u7684&#xff1a;<\/p>\n<p id=\"u5bf072d3\">1\u3001\u6570\u636e\u5e93\u6570\u636e<\/p>\n<p id=\"u2ec346f6\">2\u3001\u65e5\u5fd7\u6570\u636e<\/p>\n<p id=\"u7c6af000\">3\u3001\u7b2c\u4e09\u65b9\u6570\u636e<\/p>\n<h4 id=\"6853e527\" style=\"background-color:transparent\">1\u3001 \u4e1a\u52a1\u6570\u636e\u5e93\u7684\u5bfc\u5165<\/h4>\n<p id=\"u90e0e403\">\u91d1\u878d\u4fe1\u8d37\u4e1a\u52a1\u7684sql\u811a\u672c\u4e0a\u4f20\u81f3 linux \u7684\/opt\/modules \u4e0b&#xff0c;\u8fdb\u5165mysql\u5ba2\u6237\u7aef&#xff0c;\u521b\u5efa\u6570\u636e\u5e93&#xff0c;\u5e76\u4f7f\u7528source\u5bfc\u5165\u6570\u636e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"228\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171226-6ab013fa56ecf.png\" width=\"735\" \/><\/p>\n<p>mysql -uroot -p123456;<\/p>\n<p>DROP DATABASE &#096;jrxd&#096;;<\/p>\n<p>CREATE DATABASE &#096;jrxd&#096; COLLATE utf8mb4_general_ci;<\/p>\n<p>use jrxd;<\/p>\n<p id=\"uc84be994\">source \/opt\/modules\/jrxd-new-\u6ce8\u91ca\u7248.sql;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"366\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171226-6ab013fa7133b.png\" width=\"822\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"601\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171226-6ab013fa98ab1.png\" width=\"427\" \/><\/p>\n<h4>2\u3001\u751f\u6210 hive \u5efa\u8868\u8bed\u53e5<\/h4>\n<p>\u5728hive\u4e2d\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93:\u00a0<\/p>\n<p>create database finance;<\/p>\n<p>\u7f16\u5199python\u811a\u672c&#xff0c;\u8fde\u63a5mysql\u6570\u636e\u5e93&#xff0c;\u5e76\u67e5\u8be2jrxd\u5e93\u4e0b\u7684\u8868\u5b57\u6bb5\u4fe1\u606f&#xff0c;\u7136\u540e\u751f\u6210hive\u5efa\u8868\u8bed\u53e5&#xff0c;\u5177\u4f53\u811a\u672c\u5982\u4e0b<\/p>\n<p># \u7ed9\u5b9a\u4e00\u4e2a\u6570\u636e\u5e93\u7684\u540d\u5b57\u548c\u8868\u7684\u540d\u5b57&#xff0c;\u81ea\u52a8\u751f\u6210hive\u7684\u5efa\u8868\u8bed\u53e5<br \/>\nimport sys<br \/>\nimport pymysql<\/p>\n<p># &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061; \u914d\u7f6e\u533a &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n# \u8fde\u63a5\u53c2\u6570<br \/>\nDB_HOST &#061; &#039;bigdata001&#039;<br \/>\nDB_USER &#061; &#039;root&#039;<br \/>\nDB_PASSWORD &#061; &#039;123456&#039;<br \/>\nDB_DATABASE &#061; &#039;information_schema&#039;<br \/>\nDB_CHARSET &#061; &#039;utf8mb4&#039;<\/p>\n<p># \u76ee\u6807\u5e93\u540d<br \/>\nTARGET_DB &#061; &#039;jrxd&#039;<\/p>\n<p># Hive \u8868\u540d\u524d\u7f00&#xff08;\u751f\u6210\u5f62\u5982 ods_jrxd_xxx \u7684\u8868\u540d&#xff09;<br \/>\nTABLE_PREFIX &#061; &#039;ods_jrxd&#039;<\/p>\n<p># \u8f93\u51fa\u6587\u4ef6\u8def\u5f84<br \/>\nOUTPUT_FILE &#061; &#039;.\/hive_create_table.sql&#039;<\/p>\n<p># \u5b8c\u5584MySQL\u5230Hive\u7684\u7c7b\u578b\u6620\u5c04&#xff08;\u8986\u76d6\u66f4\u591a\u573a\u666f&#xff0c;\u7b26\u5408\u751f\u4ea7\u89c4\u8303&#xff09;<br \/>\nMYSQL_TO_HIVE_TYPE_MAPPING &#061; {<br \/>\n    # \u6574\u6570\u7c7b\u578b<br \/>\n    &#039;tinyint&#039;: &#039;TINYINT&#039;,<br \/>\n    &#039;smallint&#039;: &#039;SMALLINT&#039;,<br \/>\n    &#039;int&#039;: &#039;INT&#039;,<br \/>\n    &#039;integer&#039;: &#039;INT&#039;,<br \/>\n    &#039;bigint&#039;: &#039;BIGINT&#039;,<br \/>\n    &#039;bit&#039;: &#039;BOOLEAN&#039;,  # MySQL bit(1) \u5bf9\u5e94Hive\u5e03\u5c14\u503c<br \/>\n    # \u6d6e\u70b9\/\u5b9a\u70b9\u7c7b\u578b<br \/>\n    &#039;float&#039;: &#039;FLOAT&#039;,<br \/>\n    &#039;double&#039;: &#039;DOUBLE&#039;,<br \/>\n    &#039;decimal&#039;: &#039;DECIMAL&#039;,  # \u4fdd\u7559DECIMAL\u7c7b\u578b&#xff08;\u91d1\u878d\u573a\u666f\u4e0d\u5efa\u8bae\u8f6cSTRING&#xff09;<br \/>\n    &#039;numeric&#039;: &#039;DECIMAL&#039;,<br \/>\n    # \u5b57\u7b26\u4e32\u7c7b\u578b<br \/>\n    &#039;varchar&#039;: &#039;STRING&#039;,<br \/>\n    &#039;char&#039;: &#039;STRING&#039;,<br \/>\n    &#039;text&#039;: &#039;STRING&#039;,<br \/>\n    &#039;tinytext&#039;: &#039;STRING&#039;,<br \/>\n    &#039;mediumtext&#039;: &#039;STRING&#039;,<br \/>\n    &#039;longtext&#039;: &#039;STRING&#039;,<br \/>\n    &#039;enum&#039;: &#039;STRING&#039;,<br \/>\n    &#039;set&#039;: &#039;STRING&#039;,<br \/>\n    # \u65e5\u671f\u65f6\u95f4\u7c7b\u578b<br \/>\n    &#039;date&#039;: &#039;DATE&#039;,<br \/>\n    &#039;datetime&#039;: &#039;STRING&#039;,  # \u907f\u65f6\u533a\u95ee\u9898&#xff0c;\u5efa\u8bae\u5b58\u5b57\u7b26\u4e32<br \/>\n    &#039;timestamp&#039;: &#039;STRING&#039;,<br \/>\n    &#039;time&#039;: &#039;STRING&#039;,<br \/>\n    &#039;year&#039;: &#039;INT&#039;,<br \/>\n    # \u4e8c\u8fdb\u5236\u7c7b\u578b<br \/>\n    &#039;binary&#039;: &#039;BINARY&#039;,<br \/>\n    &#039;varbinary&#039;: &#039;BINARY&#039;,<br \/>\n    &#039;blob&#039;: &#039;BINARY&#039;,<br \/>\n    &#039;tinyblob&#039;: &#039;BINARY&#039;,<br \/>\n    &#039;mediumblob&#039;: &#039;BINARY&#039;,<br \/>\n    &#039;longblob&#039;: &#039;BINARY&#039;,<br \/>\n    # \u5176\u4ed6\u7c7b\u578b<br \/>\n    &#039;boolean&#039;: &#039;BOOLEAN&#039;,<br \/>\n    &#039;bool&#039;: &#039;BOOLEAN&#039;<br \/>\n}<\/p>\n<p>def connect_db():<br \/>\n    &#034;&#034;&#034;\u8fde\u63a5\u6570\u636e\u5e93&#xff0c;\u8fd4\u56de\u8fde\u63a5\u5bf9\u8c61\u3002&#034;&#034;&#034;<br \/>\n    conn &#061; pymysql.connect(<br \/>\n        host&#061;DB_HOST,<br \/>\n        user&#061;DB_USER,<br \/>\n        password&#061;DB_PASSWORD,<br \/>\n        database&#061;DB_DATABASE,<br \/>\n        charset&#061;DB_CHARSET,<br \/>\n        cursorclass&#061;pymysql.cursors.DictCursor  # \u8fd4\u56de\u5b57\u5178\u683c\u5f0f&#xff0c;\u66f4\u6613\u8bfb<br \/>\n    )<br \/>\n    # \u6821\u9a8c\u8fde\u63a5\u5b58\u6d3b&#xff08;\u771f\u5b9e\u548cmysql\u901a\u4fe1&#xff09;<br \/>\n    conn.ping()<br \/>\n    print(&#034;MySQL\u8fde\u63a5\u6210\u529f&#xff01;&#034;)<br \/>\n    return conn<\/p>\n<p>def get_table_info(conn, db_name):<br \/>\n    &#034;&#034;&#034;\u83b7\u53d6\u6307\u5b9a\u5e93\u4e0b\u6240\u6709\u57fa\u7840\u8868\u7684\u4fe1\u606f&#xff0c;key \u7edf\u4e00\u8f6c\u4e3a\u5c0f\u5199\u3002&#034;&#034;&#034;<br \/>\n    sql &#061; &#034;&#034;&#034;<br \/>\n          SELECT table_schema, table_name, table_comment<br \/>\n          FROM information_schema.&#096;TABLES&#096;<br \/>\n          WHERE table_schema &#061; %s<br \/>\n            AND table_type &#061; &#039;BASE TABLE&#039;<br \/>\n          ORDER BY table_name<br \/>\n          &#034;&#034;&#034;<br \/>\n    with conn.cursor() as cursor:<br \/>\n        cursor.execute(sql, (db_name,))<br \/>\n        result &#061; cursor.fetchall()<br \/>\n    return [_lower_keys(item) for item in result]<\/p>\n<p>def get_all_column_info(conn, db_name):<br \/>\n    &#034;&#034;&#034;\u4e00\u6b21\u6027\u83b7\u53d6\u6307\u5b9a\u5e93\u4e0b\u6240\u6709\u8868\u7684\u5b57\u6bb5\u4fe1\u606f&#xff0c;\u6309\u8868\u540d\u5206\u7ec4&#xff0c;key \u7edf\u4e00\u8f6c\u4e3a\u5c0f\u5199\u3002&#034;&#034;&#034;<br \/>\n    sql &#061; &#034;&#034;&#034;<br \/>\n          SELECT table_name, column_name, data_type, column_comment<br \/>\n          FROM information_schema.&#096;COLUMNS&#096;<br \/>\n          WHERE table_schema &#061; %s<br \/>\n          ORDER BY table_name, ordinal_position<br \/>\n          &#034;&#034;&#034;<br \/>\n    with conn.cursor() as cursor:<br \/>\n        cursor.execute(sql, (db_name,))<br \/>\n        result &#061; cursor.fetchall()<\/p>\n<p>    columns_by_table &#061; {}<br \/>\n    for item in result:<br \/>\n        item &#061; _lower_keys(item)<br \/>\n        table_name &#061; item.pop(&#039;table_name&#039;)<br \/>\n        columns_by_table.setdefault(table_name, []).append(item)<br \/>\n    return columns_by_table<\/p>\n<p>def _lower_keys(mapping):<br \/>\n    &#034;&#034;&#034;\u5c06\u5b57\u5178\u7684 key \u7edf\u4e00\u8f6c\u4e3a\u5c0f\u5199\u3002&#034;&#034;&#034;<br \/>\n    return {k.lower(): v for k, v in mapping.items()}<\/p>\n<p>def _quote(value):<br \/>\n    &#034;&#034;&#034;\u8f6c\u4e49\u6ce8\u91ca\u6587\u672c\u4e2d\u7684\u5355\u5f15\u53f7&#xff0c;\u907f\u514d\u7834\u574f SQL \u8bed\u6cd5\u3002&#034;&#034;&#034;<br \/>\n    if value is None:<br \/>\n        return &#039;&#039;<br \/>\n    return str(value).replace(&#034;\\\\\\\\&#034;, &#034;\\\\\\\\\\\\\\\\&#034;).replace(&#034;&#039;&#034;, &#034;&#039;&#039;&#034;)<\/p>\n<p>def generate_hive_ddl(db_name, table_name, table_comment, field_info):<br \/>\n    &#034;&#034;&#034;\u6839\u636e\u8868\u4fe1\u606f\u751f\u6210 Hive \u5efa\u8868\u8bed\u53e5\u3002&#034;&#034;&#034;<br \/>\n    hive_columns &#061; []<br \/>\n    for field in field_info:<br \/>\n        column_name &#061; field[&#039;column_name&#039;]<br \/>\n        data_type &#061; field[&#039;data_type&#039;].lower()<br \/>\n        column_comment &#061; _quote(field[&#039;column_comment&#039;])<br \/>\n        hive_type &#061; MYSQL_TO_HIVE_TYPE_MAPPING.get(data_type, &#039;STRING&#039;)<br \/>\n        # \u7528\u53cd\u5f15\u53f7\u5305\u88f9\u5217\u540d&#xff0c;\u907f\u514d\u4e0e Hive \u5173\u952e\u5b57\u51b2\u7a81<br \/>\n        hive_columns.append(f&#034;&#096;{column_name}&#096; {hive_type} COMMENT &#039;{column_comment}&#039;&#034;)<\/p>\n<p>    table_comment &#061; _quote(table_comment)<br \/>\n    columns_str &#061; &#034;,\\\\n\\\\t&#034;.join(hive_columns)<br \/>\n    return f&#034;&#034;&#034;CREATE TABLE IF NOT EXISTS &#096;{db_name}&#096;.&#096;{TABLE_PREFIX}_{table_name}&#096; (<br \/>\n\\\\t{columns_str}<br \/>\n)<br \/>\nCOMMENT &#039;{table_comment}&#039;<br \/>\nROW FORMAT DELIMITED<br \/>\nFIELDS TERMINATED BY &#039;,&#039;;<br \/>\n&#034;&#034;&#034;<\/p>\n<p>def main():<br \/>\n    conn &#061; None<br \/>\n    try:<br \/>\n        conn &#061; connect_db()<\/p>\n<p>        tables &#061; get_table_info(conn, TARGET_DB)<br \/>\n        print(&#034;\u83b7\u53d6\u6240\u6709\u8868\u4fe1\u606f:&#034;, tables)<\/p>\n<p>        columns_by_table &#061; get_all_column_info(conn, TARGET_DB)<br \/>\n        print(&#034;\u83b7\u53d6\u6240\u6709\u8868\u5b57\u6bb5\u4fe1\u606f:&#034;, columns_by_table)<\/p>\n<p>        ddl_list &#061; []<br \/>\n        for row in tables:<br \/>\n            table_name &#061; row[&#039;table_name&#039;]<br \/>\n            field_info &#061; columns_by_table.get(table_name, [])<\/p>\n<p>            create_hive_table_sql &#061; generate_hive_ddl(<br \/>\n                row[&#039;table_schema&#039;],<br \/>\n                table_name,<br \/>\n                row[&#039;table_comment&#039;],<br \/>\n                field_info,<br \/>\n            )<br \/>\n            print(&#034;\u751f\u6210DDL\u8bed\u53e5:&#034;, create_hive_table_sql)<br \/>\n            ddl_list.append(create_hive_table_sql)<\/p>\n<p>        # \u4e00\u6b21\u6027\u5199\u5165\u6587\u4ef6&#xff0c;\u51cf\u5c11 I\/O \u6b21\u6570<br \/>\n        with open(OUTPUT_FILE, &#039;w&#039;, encoding&#061;&#039;utf-8&#039;) as f:<br \/>\n            f.write(&#039;\\\\n&#039;.join(ddl_list))<\/p>\n<p>        print(&#034;\u521b\u5efaDDL\u5b8c\u6210&#034;)<br \/>\n    except pymysql.MySQLError as e:<br \/>\n        print(f&#034;\u6570\u636e\u5e93\u64cd\u4f5c\u5931\u8d25: {e}&#034;, file&#061;sys.stderr)<br \/>\n        sys.exit(1)<br \/>\n    except OSError as e:<br \/>\n        print(f&#034;\u6587\u4ef6\u64cd\u4f5c\u5931\u8d25: {e}&#034;, file&#061;sys.stderr)<br \/>\n        sys.exit(1)<br \/>\n    finally:<br \/>\n        if conn is not None:<br \/>\n            conn.close()<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    main()<\/p>\n<p>\u6267\u884c\u540e\u751f\u6210DDL&#xff0c;\u5728\u4e0b\u9762\u7684\u6587\u4ef6<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"198\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171226-6ab013fab47e5.png\" width=\"683\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6570\u636e\u4ed3\u5e93\u4ecb\u7ecd\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e&#xff0c;\u62bd\u53d6\u5230\u4e00\u4e2a\u5927\u7684\u6570\u636e\u5e93(\u6570\u636e\u4ed3\u5e93)&#xff0c;\u76f8\u5f53\u4e8e\u53ef\u4ee5\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u7684\u6570\u636e\u6574\u5408\u5230\u4e00\u8d77&#xff0c;\u7136\u540e\u5bf9\u5176\u4e2d\u7684\u6570\u636e\u8fdb\u884c\u52a0\u5de5\u5206\u6790\u5904\u7406&#xff0c;\u4e5f\u65b9\u4fbf\u540e\u7eed\u5173\u8054\u67e5\u8be2\u3002\u4f8b\u5982&#xff1a;\u5982\u679c\u6709\u7684\u4e1a\u52a1\u9700\u8981\u67e5\u8be2\u4e24\u4e2a\u4e0d\u540c\u7684\u4e1a\u52a1\u5e93&#xff0c;\u6ca1\u6709\u6570\u636e\u4ed3\u5e93\u8fd9\u4e2a\u4e2d\u8f6c\u7ad9&#xff0c;\u662f\u529e\u4e0d\u5230\u7684\u3002\u6570\u636e\u4ed3\u5e93\u67b6\u6784\u6570\u636e\u4ed3\u5e93\u5206\u5c421\u3001\u6e05\u6670\u7684\u6570\u636e\u7ed3\u6784&#xff1a;\u6bcf\u4e00\u5c42\u7684\u4f5c\u7528\u4e0d\u4e00\u6837&#xff0c;\u76ee\u7684\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5b9a\u4f4d\u548c\u7406\u89e3\u6570\u636e<br \/>\n2\u3001\u65b9<\/p>\n","protected":false},"author":2,"featured_media":108128,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2330],"topic":[],"class_list":["post-108136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-2330"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528 - \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\/108136.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6570\u636e\u4ed3\u5e93\u4ecb\u7ecd\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e&#xff0c;\u62bd\u53d6\u5230\u4e00\u4e2a\u5927\u7684\u6570\u636e\u5e93(\u6570\u636e\u4ed3\u5e93)&#xff0c;\u76f8\u5f53\u4e8e\u53ef\u4ee5\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u7684\u6570\u636e\u6574\u5408\u5230\u4e00\u8d77&#xff0c;\u7136\u540e\u5bf9\u5176\u4e2d\u7684\u6570\u636e\u8fdb\u884c\u52a0\u5de5\u5206\u6790\u5904\u7406&#xff0c;\u4e5f\u65b9\u4fbf\u540e\u7eed\u5173\u8054\u67e5\u8be2\u3002\u4f8b\u5982&#xff1a;\u5982\u679c\u6709\u7684\u4e1a\u52a1\u9700\u8981\u67e5\u8be2\u4e24\u4e2a\u4e0d\u540c\u7684\u4e1a\u52a1\u5e93&#xff0c;\u6ca1\u6709\u6570\u636e\u4ed3\u5e93\u8fd9\u4e2a\u4e2d\u8f6c\u7ad9&#xff0c;\u662f\u529e\u4e0d\u5230\u7684\u3002\u6570\u636e\u4ed3\u5e93\u67b6\u6784\u6570\u636e\u4ed3\u5e93\u5206\u5c421\u3001\u6e05\u6670\u7684\u6570\u636e\u7ed3\u6784&#xff1a;\u6bcf\u4e00\u5c42\u7684\u4f5c\u7528\u4e0d\u4e00\u6837&#xff0c;\u76ee\u7684\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5b9a\u4f4d\u548c\u7406\u89e3\u6570\u636e 2\u3001\u65b9\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/108136.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-20T17:12:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171224-6ab013f8e06e6.png\" \/>\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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/108136.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/108136.html\",\"name\":\"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-20T17:12:28+00:00\",\"dateModified\":\"2026-09-20T17:12:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/108136.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/108136.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/108136.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528\"}]},{\"@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":"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528 - \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\/108136.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6570\u636e\u4ed3\u5e93\u4ecb\u7ecd\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e&#xff0c;\u62bd\u53d6\u5230\u4e00\u4e2a\u5927\u7684\u6570\u636e\u5e93(\u6570\u636e\u4ed3\u5e93)&#xff0c;\u76f8\u5f53\u4e8e\u53ef\u4ee5\u5c06\u5404\u4e2a\u4e1a\u52a1\u7cfb\u7edf\u7684\u6570\u636e\u6574\u5408\u5230\u4e00\u8d77&#xff0c;\u7136\u540e\u5bf9\u5176\u4e2d\u7684\u6570\u636e\u8fdb\u884c\u52a0\u5de5\u5206\u6790\u5904\u7406&#xff0c;\u4e5f\u65b9\u4fbf\u540e\u7eed\u5173\u8054\u67e5\u8be2\u3002\u4f8b\u5982&#xff1a;\u5982\u679c\u6709\u7684\u4e1a\u52a1\u9700\u8981\u67e5\u8be2\u4e24\u4e2a\u4e0d\u540c\u7684\u4e1a\u52a1\u5e93&#xff0c;\u6ca1\u6709\u6570\u636e\u4ed3\u5e93\u8fd9\u4e2a\u4e2d\u8f6c\u7ad9&#xff0c;\u662f\u529e\u4e0d\u5230\u7684\u3002\u6570\u636e\u4ed3\u5e93\u67b6\u6784\u6570\u636e\u4ed3\u5e93\u5206\u5c421\u3001\u6e05\u6670\u7684\u6570\u636e\u7ed3\u6784&#xff1a;\u6bcf\u4e00\u5c42\u7684\u4f5c\u7528\u4e0d\u4e00\u6837&#xff0c;\u76ee\u7684\u662f\u4e3a\u4e86\u66f4\u597d\u7684\u5b9a\u4f4d\u548c\u7406\u89e3\u6570\u636e 2\u3001\u65b9","og_url":"https:\/\/www.wsisp.com\/helps\/108136.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-20T17:12:28+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920171224-6ab013f8e06e6.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/108136.html","url":"https:\/\/www.wsisp.com\/helps\/108136.html","name":"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-20T17:12:28+00:00","dateModified":"2026-09-20T17:12:28+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/108136.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/108136.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/108136.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6570\u636e\u4ed3\u5e93 \u7684\u4ecb\u7ecd\u548c\u4f7f\u7528"}]},{"@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\/108136","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=108136"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/108136\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/108128"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=108136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=108136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=108136"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=108136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}