JDBC SQL Server Source Connector: 一览与实践
<section id="nice" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px; padding: 0 10px; line-height: 1.6; word-spacing: 0px; letter-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: left; color: #333; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;"><p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; color: black; font-size: 16px; line-height: 2; font-weight: 400;">在快速发展的数据驱动业务环境中,确保数据在各个系统间高效、准确地同步至关重要。为了进一步的数据处理和分析,经常需要将这些数据同步到其他数据处理系统。Apache SeaTunnel 提供了一个强大而灵活的数据集成框架,使得从 SQL Server 到其他系统的数据同步变得简单且高效。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; color: black; font-size: 16px; line-height: 2; font-weight: 400; margin-top: 16px;">本文档将指导您如何配置 Apache SeaTunnel,使用 JDBC SQL Server Source Connector 来实现数据的有效同步。</p> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">JDBC SQL Server Source Connector</p> </blockquote> <h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">支持 SQL Server 版本</span><span class="suffix"></span></h2> <ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc;"> <li><section style="margin-top: 5px; margin-bottom: 5px; text-align: left; color: rgb(1,1,1); font-weight: 500; line-height: 2;">服务器:2008(或更高版本,仅供信息参考)</section></li></ul> <h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">支持以下引擎</span><span class="suffix"></span></h2> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">Spark <br> Flink <br> Seatunnel Zeta <br></p> </blockquote> <h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">主要特点</span><span class="suffix"></span></h2> <ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc;"> <li><section style="margin-top: 5px; margin-bottom: 5px; text-align: left; color: rgb(1,1,1); font-weight: 500; line-height: 2;">[x] <a href="../../concept/connector-v2-features.md" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">批处理</a></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; text-align: left; color: rgb(1,1,1); font-weight: 500; line-height: 2;">[ ] <a href="../../concept/connector-v2-features.md" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">流处理</a></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; text-align: left; color: rgb(1,1,1); font-weight: 500; line-height: 2;">[x] <a href="../../concept/connector-v2-features.md" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">精准一次性</a></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; text-align: left; color: rgb(1,1,1); font-weight: 500; line-height: 2;">[x] <a href="../../concept/connector-v2-features.md" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">列投影</a></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; text-align: left; color: rgb(1,1,1); font-weight: 500; line-height: 2;">[x] <a href="../../concept/connector-v2-features.md" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">并行处理</a></section></li><li><section style="margin-top: 5px; margin-bottom: 5px; text-align: left; color: rgb(1,1,1); font-weight: 500; line-height: 2;">[x] <a href="../../concept/connector-v2-features.md" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">支持用户定义拆分</a></section></li></ul> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">支持查询 SQL 并能够实现投影效果。</p> </blockquote> <h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">描述</span><span class="suffix"></span></h2> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; color: black; font-size: 16px; line-height: 2; font-weight: 400;">通过 JDBC 读取外部数据源数据。</p> <h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">支持的数据源信息</span><span class="suffix"></span></h2> <section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left; border-spacing: 0;"> <thead> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">数据源</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">支持的版本</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">驱动</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">URL</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">Maven</th> </tr> </thead> <tbody style="border: 0;"> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SQL Server</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">支持版本 >= 2008</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">com.microsoft.sqlserver.jdbc.SQLServerDriver</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">jdbc:sqlserver://localhost:1433</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;"><a href="https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">下载</a></td> </tr> </tbody> </table> </section><h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">数据库依赖</span><span class="suffix"></span></h2> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">请下载与 'Maven' 对应的支持列表,并将其复制到 '<span class="span-inline-equation" style="cursor:pointer"><img class="Formula-image" data-eeimg="true" src alt="SEATNUNNEL_HOME/plugins/jdbc/lib/' 工作目录
例如 SQL Server 数据源:cp mssql-jdbc-xxx.jar " style="display: block; margin: 0 auto; max-width: 100%;"></span>SEATNUNNEL_HOME/plugins/jdbc/lib/</p>
</blockquote> <h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">数据类型映射</span><span class="suffix"></span></h2> <section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left; border-spacing: 0;"> <thead> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">SQL Server 数据类型</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">Seatunnel 数据类型</th> </tr> </thead> <tbody style="border: 0;"> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">BIT</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">BOOLEAN</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">TINYINT<br>SMALLINT</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SHORT</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">INTEGER</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">INT</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">BIGINT</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">LONG</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">DECIMAL<br>NUMERIC<br>MONEY<br>SMALLMONEY</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">DECIMAL((指定列的指定列大小)+1,<br>(获取指定列的小数点右边的数字的数量。)))</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">REAL</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">FLOAT</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">FLOAT</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">DOUBLE</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">CHAR<br>NCHAR<br>VARCHAR<br>NTEXT<br>NVARCHAR<br>TEXT</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">STRING</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">DATE</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">LOCAL_DATE</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">TIME</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">LOCAL_TIME</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">DATETIME<br>DATETIME2<br>SMALLDATETIME<br>DATETIMEOFFSET</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">LOCAL_DATE_TIME</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">TIMESTAMP<br>BINARY<br>VARBINARY<br>IMAGE<br>UNKNOWN</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">尚不支持</td> </tr> </tbody> </table> </section><h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">源选项</span><span class="suffix"></span></h2> <section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table style="display: table; text-align: left; border-spacing: 0;"> <thead> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">名称</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">类型</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">必需</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">默认值</th> <th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #d4f1ff; min-width: 85px;">描述</th> </tr> </thead> <tbody style="border: 0;"> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">url</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">字符串</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">是</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">JDBC 连接的 URL。例如:jdbc:sqlserver://127.0.0.1:1434;database=TestDB</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">driver</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">字符串</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">是</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">用于连接到远程数据源的 JDBC 类名,如果使用 SQL Server,则值为 <code>com.microsoft.sqlserver.jdbc.SQLServerDriver</code>。</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">user</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">字符串</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">连接实例的用户名</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">password</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">字符串</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">连接实例的密码</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">query</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">字符串</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">是</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">查询语句</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">connection_check_timeout_sec</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">整数</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">30</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">等待用于验证连接的数据库操作完成的秒数</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">partition_column</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">字符串</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">并行处理的分区列,仅支持数值类型。</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">partition_lower_bound</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">长整数</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">用于扫描的 partition_column 最小值,如果未设置,SeaTunnel 将查询数据库获取最小值。</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">partition_upper_bound</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">长整数</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">用于扫描的 partition_column 最大值,如果未设置,SeaTunnel 将查询数据库获取最大值。</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">partition_num</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">整数</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">作业并行度</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">分区计数的数量,仅支持正整数。默认值为作业并行度。</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">fetch_size</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">整数</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">0</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">对返回大量对象的查询,您可以配置查询中使用的行抓取大小,以减少满足选择条件所需的数据库命中次数,从而提高性能。<br>零表示使用 JDBC 默认值。</td> </tr> <tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">common-options</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;"></td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">否</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">-</td> <td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">源插件的常见参数,请参阅 <a href="common-options.md" style="word-wrap: break-word; color: #036aca; border-bottom: 0; font-weight: 400; text-decoration: none;">源常用选项</a> 以获取详细信息。</td> </tr> </tbody> </table> </section><h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">提示</span><span class="suffix"></span></h2> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">如果未设置 partition_column,则将以单一并发运行;如果设置了 partition_column,则将根据任务的并发度进行并行执行。</p> </blockquote> <h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; position: relative; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content" style="border-left: 4px solid; padding-left: 10px;">任务示例</span><span class="suffix"></span></h2> <h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; font-size: 16px;"><span class="prefix" style="display: none;"></span><span class="content">简单:</span><span class="suffix" style="display: none;"></span></h3> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">简单的单一任务以读取数据表</p> </blockquote> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #272822; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #ddd; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #272822; border-radius: 5px;"><span class="hljs-section" style="color: #a6e22e; font-weight: bold; line-height: 26px;"># 定义运行时环境</span><br>env {<br> # 您可以在此处设置 Flink 配置<br> execution.parallelism = 1<br> job.mode = "BATCH"<br>}<br>source{<br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> Jdbc {</span><br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> driver = com.microsoft.sqlserver.jdbc.SQLServerDriver</span><br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> url = "jdbc:sqlserver://localhost:1433;databaseName=column_type_test"</span><br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> user = SA</span><br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> password = "Y.sa123456"</span><br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> query = "select * from full_types_jdbc"</span><br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> }</span><br>}<br><br>transform {<br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> # 如果您想要获取有关如何配置 seatunnel 和查看变换插件的完整列表的更多信息,</span><br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> # 请转到 [seatunnel.apache.org/docs/transform-v2/sql](https://seatunnel.apache.org/docs/transform-v2/sql)</span><br>}<br><br>sink {<br><span class="hljs-code" style="color: #66d9ef; line-height: 26px;"> Console {}</span><br>}<br><br></code></pre> <h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; font-size: 16px;"><span class="prefix" style="display: none;"></span><span class="content">并行:</span><span class="suffix" style="display: none;"></span></h3> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">使用您配置的分片字段和分片数据并行读取您的查询表,如果您希望读取整个表,可以这样做:</p> </blockquote> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #272822; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #ddd; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #272822; border-radius: 5px;">env {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 您可以在此处设置 Flink 配置</span><br> execution.parallelism = 10<br> job.mode = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"BATCH"</span><br>}<br><br><span class="hljs-built_in" style="color: #a6e22e; line-height: 26px;">source</span> {<br> Jdbc {<br> driver = com.microsoft.sqlserver.jdbc.SQLServerDriver<br> url = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"jdbc:sqlserver://localhost:1433;databaseName=column_type_test"</span><br> user = SA<br> password = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"Y.sa123456"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 根据需要定义查询逻辑</span><br> query = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"select * from full_types_jdbc"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 并行分片读取字段</span><br> partition_column = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"id"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 片段数量</span><br> partition_num = 10<br> }<br>}<br><br>transform {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 如果您想要获取有关如何配置 Seatunnel 和查看转换插件的完整列表的更多信息,</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 请转到 https://seatunnel.apache.org/docs/transform-v2/sql</span><br>}<br><br>sink {<br> Console {}<br>}<br></code></pre> <h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; font-size: 16px;"><span class="prefix" style="display: none;"></span><span class="content">并行:</span><span class="suffix" style="display: none;"></span></h3> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">使用您配置的分片字段和分片数据并行读取您的查询表,如果您希望读取整个表,可以这样做:</p> </blockquote> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #272822; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #ddd; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #272822; border-radius: 5px;">env {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 您可以在此处设置 Flink 配置</span><br> execution.parallelism = 10<br> job.mode = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"BATCH"</span><br>}<br><br><span class="hljs-built_in" style="color: #a6e22e; line-height: 26px;">source</span> {<br> Jdbc {<br> driver = com.microsoft.sqlserver.jdbc.SQLServerDriver<br> url = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"jdbc:sqlserver://localhost:1433;databaseName=column_type_test"</span><br> user = SA<br> password = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"Y.sa123456"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 根据需要定义查询逻辑</span><br> query = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"select * from full_types_jdbc"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 并行分片读取字段</span><br> partition_column = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"id"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 片段数量</span><br> partition_num = 10<br> }<br>}<br><br>transform {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 如果您想要获取有关如何配置 Seatunnel 和查看转换插件的完整列表的更多信息,</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 请转到 https://seatunnel.apache.org/docs/transform-v2/sql</span><br>}<br><br>sink {<br> Console {}<br>}<br></code></pre> <h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; font-size: 16px;"><span class="prefix" style="display: none;"></span><span class="content">并行:</span><span class="suffix" style="display: none;"></span></h3> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">使用您配置的分片字段和分片数据并行读取您的查询表,如果您希望读取整个表,可以这样做:</p> </blockquote> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #272822; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #ddd; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #272822; border-radius: 5px;">env {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 您可以在此处设置 Flink 配置</span><br> execution.parallelism = 10<br> job.mode = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"BATCH"</span><br>}<br><br><span class="hljs-built_in" style="color: #a6e22e; line-height: 26px;">source</span> {<br> Jdbc {<br> driver = com.microsoft.sqlserver.jdbc.SQLServerDriver<br> url = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"jdbc:sqlserver://localhost:1433;databaseName=column_type_test"</span><br> user = SA<br> password = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"Y.sa123456"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 根据需要定义查询逻辑</span><br> query = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"select * from full_types_jdbc"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 并行分片读取字段</span><br> partition_column = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"id"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 片段数量</span><br> partition_num = 10<br> }<br>}<br><br>transform {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 如果您想要获取有关如何配置 Seatunnel 和查看转换插件的完整列表的更多信息,</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 请转到 https://seatunnel.apache.org/docs/transform-v2/sql</span><br>}<br><br>sink {<br> Console {}<br>}<br></code></pre> <h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; font-size: 16px;"><span class="prefix" style="display: none;"></span><span class="content">并行:</span><span class="suffix" style="display: none;"></span></h3> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">使用您配置的分片字段和分片数据并行读取您的查询表,如果您希望读取整个表,可以这样做:</p> </blockquote> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #272822; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #ddd; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #272822; border-radius: 5px;">env {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 您可以在此处设置 Flink 配置</span><br> execution.parallelism = 10<br> job.mode = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"BATCH"</span><br>}<br><br><span class="hljs-built_in" style="color: #a6e22e; line-height: 26px;">source</span> {<br> Jdbc {<br> driver = com.microsoft.sqlserver.jdbc.SQLServerDriver<br> url = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"jdbc:sqlserver://localhost:1433;databaseName=column_type_test"</span><br> user = SA<br> password = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"Y.sa123456"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 根据需要定义查询逻辑</span><br> query = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"select * from full_types_jdbc"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 并行分片读取字段</span><br> partition_column = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"id"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 片段数量</span><br> partition_num = 10<br> }<br>}<br><br>transform {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 如果您想要获取有关如何配置 Seatunnel 和查看转换插件的完整列表的更多信息,</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 请转到 https://seatunnel.apache.org/docs/transform-v2/sql</span><br>}<br><br>sink {<br> Console {}<br>}<br></code></pre> <h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; padding: 30px 0; margin: 0; color: #135ce0; font-size: 16px;"><span class="prefix" style="display: none;"></span><span class="content">分段并行读取示例:</span><span class="suffix" style="display: none;"></span></h3> <blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: #b2aec5; background: #fff9f9;"> <p style="padding-top: 8px; padding-bottom: 8px; font-size: 16px; font-weight: 400; margin: 0px; color: #666; line-height: 2;">这是一个快速并行读取数据的分片示例</p> </blockquote> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; text-align: left;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #272822; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #ddd; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #272822; border-radius: 5px;">env {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 您可以在此处设置引擎配置</span><br> execution.parallelism = 10<br>}<br><br><span class="hljs-built_in" style="color: #a6e22e; line-height: 26px;">source</span> {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 这是一个示例源插件,仅用于测试和展示源插件的功能</span><br> Jdbc {<br> driver = com.microsoft.sqlserver.jdbc.SQLServerDriver<br> url = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"jdbc:sqlserver://localhost:1433;databaseName=column_type_test"</span><br> user = SA<br> password = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"Y.sa123456"</span><br> query = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"select * from column_type_test.dbo.full_types_jdbc"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 并行分片读取字段</span><br> partition_column = <span class="hljs-string" style="color: #a6e22e; line-height: 26px;">"id"</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 片段数量</span><br> partition_num = 10<br> }<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 如果您想要获取有关如何配置 Seatunnel 和查看源插件的完整列表的更多信息,</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 请转到 https://seatunnel.apache.org/docs/connector-v2/source/Jdbc</span><br>}<br><br>transform {<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 如果您想要获取有关如何配置 Seatunnel 和查看转换插件的完整列表的更多信息,</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 请转到 https://seatunnel.apache.org/docs/transform-v2/sql</span><br>}<br><br>sink {<br> Console {}<br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 如果您想要获取有关如何配置 Seatunnel 和查看接收插件的完整列表的更多信息,</span><br> <span class="hljs-comment" style="color: #75715e; line-height: 26px;"># 请转到 https://seatunnel.apache.org/docs/connector-v2/sink/Jdbc</span><br>}<br></code></pre> </section> > 本文由 [白鲸开源科技](http://www.whaleops.com) 提供发布支持!

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
AIGC 时代的算力基石,未来的数据平台将如何演进?
本文根据TEDx系列演讲「AIGC时代下的客户价值」中,阿里云研究员张为题为《一站式智能数据平台的演进》主旨演讲的内容整理。 我叫张为,是阿里云数据库的一名研究员,从事AI与数据库相结合的产品研发工作。 我过去的经历和人工智能其实有过好几段交集,最早是2003年,也就是整整20年前。当时我在清华大学人工智能实验室读研究生,接触到了非常早期的人工神经网络。有个作业是用一个非常小的神经网络来拟合一个简单的函数,用于为我们机器人的控制添加灵活性。当时所做出来的神经网络只有三层几十个神经元,也就是几十个参数。用来训练神经网络的数据,大小只有几个KB。用今天的视角来看,简直不能再迷你了。今天我们常常谈论GPU算力,那时候GPU刚诞生不久,它唯一的用途就是玩游戏,所以回看当年,无论是所拥有的数据,还是我们处理数据的能力,都远远不能让我们构建出接近任何生物的智慧信息处理能力,更不要说去挑战人类的智能了。 让我们把时间拨回到今天,经历了快速发展数字化的20年,今天我们对数据的存储分析和运算的能力,已经通过云计算基础设施得到了大大的加强。随着数据的积累,以及AI算法的不断迭代演进,今天的AI模型已经开始...
- 下一篇
Zadig 「面向对象」发布教学式文档站及教程
阅读原文/Zadig 在 Github/Zadig 在 Gitee 推荐阅读:是时候和 Jenkins 说再见了/Zadig vs. Jenkins 详细比对:时代的选择与开发者之选/平台工程和 AI 时代的新 10 亿开发者 随着新开源 Zadig V2.0.0 的正式发布,越来越多小伙伴关注 Zadig,摩拳擦掌,跃跃欲试,但是又无从下手! 莫慌!这次,官方对文档站进行了全面系统性的升级,以满足不同阶段的用户需求。 在文档站的重构过程中,我们的主要思路是“面向对象”,将内容按照不同用户角色和需求进行分类,使不同了解程度的用户可以在短时间内掌握关键概念,迅速提升成为 Zadig 专家。同时,保留最详细的「功能介绍」作为标准文档库,可以在产品使用过程中方便查阅,以解决点对点的配置细节问题。 官方文档首页分为三个主要部分:简介、平台介绍、客户故事,这个结构旨在帮助新手根据不同的应用主题迅速了解 Zadig 的使用场景和价值。通过这些部分可以快速了解以下问题:Zadig 究竟是什么?它如何为你和团队提供价值?与 Jenkins 及其他传统的 DevOps 工具相比,Zadig 有何不同之...
相关文章
文章评论
共有0条评论来说两句吧...