DataWorks offers ApsaraDB for OceanBase Reader and Writer to facilitate data reading and writing to ApsaraDB for OceanBase data sources. You can set up data synchronization tasks for these sources. This topic describes the capabilities for data synchronization to and from ApsaraDB for OceanBase data sources.
Supported versions
Batch data read and write
The following OceanBase versions are supported by ApsaraDB for OceanBase Reader and Writer.
OceanBase 2.x
OceanBase 3.x
OceanBase 4.x
Limits
Batch data read
ApsaraDB for OceanBase operates in Oracle and MySQL tenant modes. When configuring where filter conditions or function columns in column, adhere to the SQL syntax of the corresponding tenant mode to avoid execution failures.
Data from views is readable.
Do not alter data during a batch synchronization task to prevent issues like data duplication or loss.
Batch data write
The task requires at least the insert into...
permission. Additional permissions depend on the statements in preSql
and postSql
configured for the task.
It is recommended to use the batch method for writing data. Initiate a write request when the number of rows meets a set threshold.
In Oracle and MySQL tenant modes of ApsaraDB for OceanBase, ensure that preSql and postSql configurations comply with the SQL syntax of the respective tenant mode to prevent execution failures.
Real-time data read
ApsaraDB for OceanBase, a distributed relational database, can integrate data from multiple physical databases into one logical database. However, real-time data synchronization from OceanBase to AnalyticDB for MySQL only supports single physical database data. Logical database data synchronization is not supported.
Do not select a data source added in connection string mode for real-time synchronization tasks of a database.
The ApsaraDB for OceanBase database version must be V3.0 or later for real-time synchronization tasks of a database.
Preparations before data synchronization
To synchronize data with an ApsaraDB for OceanBase data source using DataWorks, prepare the ApsaraDB for OceanBase environment accordingly. The following steps outline the necessary preparations.
Preparation 1: Configure an IP address whitelist
Add the VPC CIDR block, where the Serverless resource group or the exclusive resource group for Data Integration is located, to OceanBase's whitelist. For more information, see how to add a whitelist.
Preparation 2: Prepare an account that has the required permissions
Plan for a database logon account with the necessary permissions for OceanBase operations. For details, see create an account.
Add a data source
Before you develop a synchronization task in DataWorks, you must add the required data source to DataWorks by following the instructions in Add and manage data sources. You can view the infotips of parameters in the DataWorks console to understand the meanings of the parameters when you add a data source.
Develop a data synchronization task
For information about the entry point for and the procedure of configuring a synchronization task, see the following configuration guides.
Configure a batch synchronization task to synchronize data of a single table
For operation details, see configure a batch synchronization task using the codeless UI and configure a batch synchronization task using the code editor.
For full parameters and code for the code editor, see appendix: code and parameters.
Configure a real-time synchronization task to synchronize data of a database
For operation details, see configure a real-time synchronization task on DataStudio.
Configure synchronization settings to implement (real-time) synchronization of full and incremental data in a single table or a database
For operation details, see configure a synchronization task on Data Integration.
Appendix: code and parameters
Configure a batch synchronization task by using the code editor
If you want to configure a batch synchronization task by using the code editor, you must configure the related parameters in the script based on the unified script format requirements. For more information, see Configure a batch synchronization task by using the code editor. The following information describes the parameters that you must configure for data sources when you configure a batch synchronization task by using the code editor.