All Products
Search
Document Center

DataHub:Synchronize data to OTS

Last Updated:Aug 25, 2021

Synchronize data to OTS

Synchronization method

  • Take note of the following items when you create a DataConnector to synchronize data to Tablestore (OTS):

    1. You must obtain the endpoint of OTS. An OTS instance is created and a table is created in the OTS instance.

    2. Only the owner or creator of a DataHub topic has the permissions to manage DataConnectors of the topic, such as the permissions to create or delete a DataConnector.

    3. The primary key columns of the OTS table must have a one-to-one mapping with the fields in the DataHub topic. However, their orders can be different.

    4. If you use a temporary access credential from Security Token Service (STS), the service-linked role for DataHub is automatically created. Then, DataHub uses the service-linked role to synchronize data to OTS.

  • Procedure: In the left-side navigation pane of the DataHub console, click Project Manager. On the Project List page, find a project and click View in the Actions column. On the details page of the project, find a topic and click View in the Actions column. On the details page of the topic, click Connector in the upper-right corner. In the Create Connector panel, click Tablestore, set the parameters as required, and then click Create.

    1. Go to the details page of a topic, as shown in the following figure.

      fc_02
    2. Select Tablestore and set the parameters as required, as shown in the following figure.fc_01

On the Connector tab, check the status of data synchronization.

Parameters

Parameter

Required

Description

Endpoint

Yes

The internal network endpoint of OTS.

Instance

Yes

The name of the OTS instance.

Table

Yes

The OTS table to which data is synchronized.

Data type mappings

OTS

DataHub

INTEGER

TINYINT

INTEGER

SMALLINT

INTEGER

INTEGER

INTEGER

BIGINT

INTEGER

TIMESTAMP

DOUBLE

FLOAT

DOUBLE

DOUBLE

BOOLEAN

BOOLEEAN

STRING

STRING

STRING

DECIMAL

BINARY

Not supported

Usage notes

  • The primary key columns of the OTS table must have a one-to-one mapping with the fields in the DataHub topic. Field names in DataHub are case-insensitive. If the name of a primary key in the OTS table contains uppercase letters, these uppercase letters are converted to lowercase letters in the name of the mapped field in the DataHub topic.

  • You can synchronize only data in topics of the TUPLE type to an OTS table.

  • You can write up to 200 rows of data to OTS at a time. For more information about the limits on OTS, see General limits.