You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
English | [简体中文](flink-connector-oceanbase-directload_cn.md)
4
4
5
-
This Flink Connector based on the direct-load feature of OceanBase. It can write data to OceanBase through direct-load in Flink.
5
+
This Flink Connector is based on the direct-load feature of OceanBase, enabling high-performance bulk data loading from Flink to OceanBase.
6
6
7
-
For OceanBase's direct-load feature, see the [direct-load document](https://en.oceanbase.com/docs/common-oceanbase-database-10000000001375568).
7
+
## ⚠️ Important Notes
8
+
9
+
**This connector is specifically designed for batch processing scenarios with the following characteristics:**
10
+
11
+
- ✅ **Bounded Streams Only**: Data sources must be bounded; unbounded streams are not supported. Flink Batch mode is recommended for better performance
12
+
- ✅ **High Throughput**: Ideal for large-scale data import with multi-node parallel writing capability
13
+
- ⚠️ **Table Locking During Import**: The target table will be locked during the direct-load process, allowing only SELECT queries. INSERT/UPDATE/DELETE operations are not permitted
14
+
- ⚠️ **Not for Real-time**: If you need real-time/streaming writes with unbounded streams, please use [flink-connector-oceanbase](flink-connector-oceanbase.md) instead
15
+
16
+
For more details on OceanBase's direct-load feature, see the [direct-load document](https://en.oceanbase.com/docs/common-oceanbase-database-10000000001375568).
8
17
9
18
## Getting Started
10
19
@@ -54,19 +63,34 @@ To use this connector through Flink SQL directly, you need to download the shade
- Currently, the direct-load Flink Connector only supports running in Flink Batch execution mode. Refer to the following method to enable Flink Batch execution mode.
- Currently, the direct-load Flink Connector supports two modes: single-node write and multi-node write:
68
-
- Single-node write: In this mode, the Flink Task has only one parallelism for writing. It is suitable for small and medium-sized data import. This method is simple and easy to use and is recommended.
69
-
- Multi-node write: In this mode, the parallelism of the Flink Task can be freely adjusted according to the amount of data to be imported to improve the write throughput.
#### 3、Wait for the execution of the Flink task submitted above to be completed, and finally perform the final submission action of the direct-load task in the code.
202
-
203
-
For code examples, see the complete sample code below.
// 4. After waiting for the Flink job execution to FINISHED, perform the final submission action of the direct-load task.
252
-
statement.commit();
253
-
254
-
statement.close();
255
-
connection.close();
256
-
}
257
-
}
148
+
(3, 'Alice', 95);
258
149
```
259
150
260
151
Once executed, the records should have been written to OceanBase.
261
152
153
+
**Note**: During the execution of the `INSERT` statement (while direct-load is in progress), the target table `t_sink` will be locked. Only SELECT queries are allowed; INSERT/UPDATE/DELETE operations are not permitted.
154
+
262
155
## Configuration
263
156
264
157
<divclass="highlight">
@@ -400,22 +293,6 @@ Once executed, the records should have been written to OceanBase.
400
293
</ul>
401
294
</td>
402
295
</tr>
403
-
<tr>
404
-
<td>enable-multi-node-write</td>
405
-
<td>No</td>
406
-
<td>No</td>
407
-
<td>false</td>
408
-
<td>Boolean</td>
409
-
<td>Whether to enable direct-load that supports multi-node writing. Not enabled by default.</td>
410
-
</tr>
411
-
<tr>
412
-
<td>execution-id</td>
413
-
<td>No</td>
414
-
<td>No</td>
415
-
<td></td>
416
-
<td>String</td>
417
-
<td>The execution id of the direct-load task. This parameter is only valid when the <code>enable-multi-node-write</code> parameter is true.</td>
0 commit comments