ksqlDB Connector Management in Confluent Cloud

Confluent Cloud ksqlDB supports ksqlDB connector management. This means you can create, inspect, and delete connectors in Confluent Cloud from your Confluent Cloud ksqlDB cluster.

Confluent Cloud Console

You can issue ksqlDB connector management statements from the ksqlDB editor tab of the Confluent Cloud Console with no additional setup steps required. You will be prompted to confirm pricing for any CREATE CONNECTOR statements prior to your statements being submitted.

ksqlDB Command Line Interface (CLI)

To issue connector management statements to your Confluent Cloud ksqlDB cluster from the ksqlDB CLI, pass a Confluent Cloud API key when launching the ksqlDB CLI:

ksql -u <KSQL_API_KEY> -p <KSQL_API_KEY_SECRET> --confluent-api-key <CONFLUENT_CLOUD_API_KEY> --confluent-api-secret <CONFLUENT_CLOUD_API_KEY_SECRET> <CONFLUENT_CLOUD_KSQLDB_SERVER_ADDRESS>

You can then issue ksqlDB connector management statements from the ksqlDB CLI the same as any other ksqlDB statements.

You won’t be prompted to acknowledge pricing for any CREATE CONNECTOR statements issued even though the usual connector pricing still applies.

ksqlDB REST API

To issue connector management statements to your Confluent Cloud ksqlDB cluster using the ksqlDB REST API, pass a Confluent Cloud API key by setting the following custom request headers:

curl --request POST '<CONFLUENT_CLOUD_KSQLDB_SERVER_ADDRESS>/ksql' \
[... additional headers ...]
--header 'X-Confluent-API-Key: <CONFLUENT_CLOUD_API_KEY>' \
--header 'X-Confluent-API-Secret: <CONFLUENT_CLOUD_API_SECRET>' \
-d '{"ksql": "<KSQL_CONNECTOR_MANAGEMENT_STATEMENTS>"}'

You won’t be prompted to acknowledge pricing for any CREATE CONNECTOR statements issued even though the usual connector pricing still applies.

ksqlDB Java Client

To issue ksqlDB connector management requests, including createConnector(), dropConnector(), listConnectors(), and describeConnector(), from the ksqlDB Java client, provide a Confluent Cloud API key by setting the following custom request headers as part of your ClientOptions:

Map<String, String> customHeaders = new HashMap<>();
customHeaders.put("X-Confluent-API-Key", "<CONFLUENT_CLOUD_API_KEY>");
customHeaders.put("X-Confluent-API-Secret", "<CONFLUENT_CLOUD_API_SECRET>");

ClientOptions clientOptions = ClientOptions.create();
// ... set additional options ...
clientOptions.setRequestHeaders(customHeaders);

Client client = Client.create(clientOptions);

You won’t be prompted to acknowledge pricing for any createConnector() requests issued even though the usual connector pricing still applies.

ksqlDB Migrations Tool

To apply migrations containing ksqlDB connector management requests using the ksqlDB migrations tool, provide a Confluent Cloud API key by passing a custom request headers file with the following contents, as part of applying your migrations:

# file contents located at /path/to/request_headers.txt
X-Confluent-API-Key: <CONFLUENT_CLOUD_API_KEY>
X-Confluent-API-Secret: <CONFLUENT_CLOUD_API_SECRET>

Pass the custom headers file when applying migrations with the --headers flag of the ksql-migrations apply command:

ksql-migrations ... apply --headers /path/to/request_headers.txt

You won’t be prompted to acknowledge pricing for any CREATE CONNECTOR statements applied as part of your migrations even though the usual connector pricing still applies.