Skip to main content

connectors

Creates, updates, deletes, gets or lists a connectors resource.

Overview

Nameconnectors
TypeResource
Idconfluent.connect.connectors

Fields

NameDatatypeDescription
namestringName of the connector
configobjectConfiguration parameters for the connector. These configurations are the minimum set of key-value pairs (KVP) which can be used to define how the connector connects Kafka to the external system. Some of these KVPs are common to all the connectors, such as connection parameters to Kafka, connector metadata, etc. The list of common connector configurations is as follows - cloud.environment - cloud.provider - connector.class - kafka.api.key - kafka.api.secret - kafka.endpoint - kafka.region - name A specific connector such as GcsSink would have additional parameters such as gcs.bucket.name, flush.size, etc.
tasksarrayList of active tasks generated by the connector
typestringType of connector, sink or source

Methods

NameAccessible byRequired ParamsDescription
list_connectv1connectorsSELECTenvironment_id, kafka_cluster_idGeneral Availability Retrieve a list of "names" of the active connectors. You can then make a read request for a specific connector by name.
read_connectv1connectorSELECTconnector_name, environment_id, kafka_cluster_idGeneral Availability Get information about the connector.
create_connectv1connectorINSERTenvironment_id, kafka_cluster_idGeneral Availability Create a new connector. Returns the new connector information if successful.
delete_connectv1connectorDELETEconnector_name, environment_id, kafka_cluster_idGeneral Availability Delete a connector. Halts all tasks and deletes the connector configuration.
pause_connectv1connectorEXECconnector_name, environment_id, kafka_cluster_idGeneral Availability Pause the connector and its tasks. Stops message processing until the connector is resumed. This call is asynchronous and the tasks will not transition to PAUSED state at the same time.
resume_connectv1connectorEXECconnector_name, environment_id, kafka_cluster_idGeneral Availability Resume a paused connector or do nothing if the connector is not paused. This call is asynchronous and the tasks will not transition to RUNNING state at the same time.

SELECT examples

General Availability Retrieve a list of "names" of the active connectors. You can then make a read request for a specific connector by name.

SELECT
name,
config,
tasks,
type
FROM confluent.connect.connectors
WHERE environment_id = '{{ environment_id }}'
AND kafka_cluster_id = '{{ kafka_cluster_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new connectors resource.

/*+ create */
INSERT INTO confluent.connect.connectors (
data__name,
data__config,
data__offsets,
environment_id,
kafka_cluster_id
)
SELECT
'{{ name }}',
'{{ config }}',
'{{ offsets }}',
'{{ environment_id }}',
'{{ kafka_cluster_id }}'
;

DELETE example

Deletes the specified connectors resource.

/*+ delete */
DELETE FROM confluent.connect.connectors
WHERE connector_name = '{{ connector_name }}'
AND environment_id = '{{ environment_id }}'
AND kafka_cluster_id = '{{ kafka_cluster_id }}';