Create an Elasticsearch sink connector
Use an Elasticsearch sink connector to index the changes captured from your source database in Elasticsearch. The connector reads the Kafka topics you choose and writes each topic to an index.
Prerequisites
- A CDC Service whose status is Healthy. See Create a CDC Service.
- Topics with change data, written by a source connector such as a PostgreSQL source connector.
- The URL of your Elasticsearch cluster, with a username and password.
Create the connector
-
Select Data platform → Workspace management, then select your workspace.
-
On the Overview tab, under Services, select the CDC card.
-
Select the Connectors tab, then select Create Connector.

-
On the Connector Information screen, enter a Name, select sink in Type, and select Elastic Search in Database.

-
Select Next Step. On the Properties screen, enter the connection details, then select Test connection. Next Step becomes available after the test succeeds.

-
On the same screen, choose a Converter class and set the four converter fields. Under Kafka topic, select +, then select the topics to read in the Select topics panel.


-
Select Next Step. On the Additional properties screen, set the fields in the Task, Map table, and Error Tolerance sections.



-
Select Next Step and check the settings on the Review screen.
-
Select Create.
Connector settings
Connector information
| Field | Required | Description |
|---|---|---|
| Name | Yes | The connector name. Use lowercase letters, digits, and hyphens (-) only. Upper-case letters, _, ., and spaces are rejected with "Name has invalid characters". |
| Type | Yes | Select sink. |
| Database | Yes | Select Elastic Search. |
Properties
This connector has no From FPT Database Engine option. Enter the connection details in the Database Information section. See Connection mode for how Test connection works.
| Field | Required | Description |
|---|---|---|
| URL | Yes | The address of your Elasticsearch cluster, including the scheme, such as https://. Without a scheme, the form shows "URL must be a valid uri". |
| Username | Yes | The username the connector uses to connect to Elasticsearch. |
| Password | Yes | The password for that user. |
| Converter class | Yes | The converter class for this connector. The portal offers Elasticsearch. The four converter fields stay greyed out until you choose a class. See Converter. |
| Converter key, Converter key schema enable, Converter value, Converter value schema enable | Yes | How the connector reads the keys and values of the messages, and whether they carry a schema. With Elasticsearch, Converter key offers only org.apache.kafka.connect.storage.StringConverter and Converter key schema enable only false. Converter value offers only org.apache.kafka.connect.json.JsonConverter, and Converter value schema enable true or false. |
| Kafka topic | Yes | The topics to read, up to 100. Select + to open the Select topics panel, select the topics, then select Select. See Topics. |
Additional properties
| Field | Required | Description |
|---|---|---|
| Number of tasks | Yes | The maximum number of tasks that run in parallel. Default 1. See Tasks max. |
| Topic 1, Create new table, Index (under Map table) | Yes | The index that receives the records of each topic. Turn on Create new table and enter a name to create a new index, or turn it off and select an existing index. See Map table. |
| Mode (under Error Tolerance) | Yes | What the connector does with a message that it cannot read or convert. None stops the connector with status Failed. All skips the message and sends it to the topic you enter for failed records. The field has no default. See Error tolerance. |