Parameter | Description | Required | Default value |
datasource | If the version of DataWorks that you use supports adding ApsaraDB for OceanBase data sources, you can reference the ApsaraDB for OceanBase data source that you added based on the data source name. Includes two configuration methods: jdbcUrl and username. | Yes | None |
jdbcUrl | The JDBC URL of the ApsaraDB for OceanBase database. Use a JSON array to describe the information, and support filling in multiple connection addresses for a database. If you specify multiple JDBC URLs, ApsaraDB for OceanBase Reader verifies the connectivity of the URLs in sequence to find a valid URL. If no URL is valid, ApsaraDB for OceanBase Reader returns an error. Note jdbcUrl must be included in the connection configuration unit. jdbcUrl According to the official specifications of ApsaraDB for OceanBase, you can fill in connection attachment control information. For example, jdbc:oceanbase://127.0.0.1:3306/database , you need to choose between this and the username configuration method. | No | None |
username | The username that you use to connect to the database. | No | None |
password | The password that you use to connect to the database. | No | None |
table | The name of the table from which you want to read data. Use a JSON array to describe the table names. You can read data from multiple tables. If you specify multiple tables, make sure that the tables have the same schema. ApsaraDB for OceanBase Reader does not check whether the tables have the same schema. Note table must be included in the connection configuration unit. | Yes | None |
column | The names of the columns from which you want to read data. Specify the names in a JSON array. The default value is [ * ], which indicates all columns in the source table. The column order can be changed. This indicates that you can specify columns in an order different from the order specified by the schema of the source table. You can select specific columns to read. Constants can be configured. For example, '123' . Function columns are supported. For example, date('now') . column must explicitly specify the collection of columns to be synchronized. It cannot be empty.
| Yes | None |
splitPk | When ApsaraDB for OceanBase Reader retrieves data, if you specify splitPk, it indicates that you want to use the field represented by splitPk for data sharding. As a result, concurrent tasks are started to synchronize data, which improves the efficiency of data synchronization. It is recommended that you use the primary key of the table as splitPk because the primary key is usually evenly distributed. Therefore, the shards obtained are less likely to have data hot spots. Currently, splitPk supports only integer data sharding. String, floating point, and date data types are not supported. If you set this parameter to a field of an unsupported data type, ApsaraDB for OceanBase Reader returns an error. If you set splitPk to an empty value, the system considers that you do not allow sharding for a single table. Therefore, a single channel is used for extraction.
| No | Empty |
where | ApsaraDB for OceanBase Reader concatenates SQL statements based on the specified column, table, and where conditions, and retrieves data based on the SQL statements. For example, during testing, you can specify the where condition as limit 10. In actual business scenarios, you usually select the data of the current day for synchronization and specify the where condition as gmt_create>$bizdate . The where condition can effectively perform business incremental synchronization. If the where condition is not configured or is empty, the system considers that the entire table is synchronized.
| No | None |
querySql | In some business scenarios, the where configuration item is not sufficient to describe the selected conditions. You can use this configuration item to customize the filter SQL. After this item is configured, the data synchronization system ignores the tables, columns, and splitPk configuration items and directly uses the content configured in this item to filter data. When you configure querySql, ApsaraDB for OceanBase Reader directly ignores the table, column, where, and splitPk conditions. | No | None |
fetchSize | This configuration item defines the number of data records that the plug-in and the database server retrieve at a time. This value determines the number of interactions between Data Integration and the database server and can greatly improve data extraction performance. Note If the fetchSize value is too large (>2048), the data synchronization process may cause an out-of-memory (OOM) error. | No | 1,024 |