Skip to main content

connectors

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

Overview

Nameconnectors
TypeResource
Idconfluent.connect.connectors

Fields

The following fields are returned by SELECT queries:

Connector.

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 (sink, source)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
read_connectv1_connectorselectconnector_name, environment_id, kafka_cluster_idGet information about the connector.
list_connectv1_connectorsselectenvironment_id, kafka_cluster_idRetrieve a list of "names" of the active connectors. You can then make a read request for a specific connector by name.
create_connectv1_connectorinsertenvironment_id, kafka_cluster_idCreate a new connector. Returns the new connector information if successful.
delete_connectv1_connectordeleteconnector_name, environment_id, kafka_cluster_idDelete a connector. Halts all tasks and deletes the connector configuration.
list_connectv1_connectors_with_expansionsexecenvironment_id, kafka_cluster_idexpandRetrieve an object with the queried expansions of all connectors. Without expand query parameter, this list connector’s endpoint will return a list of only the connector names.
pause_connectv1_connectorexecconnector_name, environment_id, kafka_cluster_idPause 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_connectv1_connectorexecconnector_name, environment_id, kafka_cluster_idResume 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.
restart_connectv1_connectorexecconnector_name, environment_id, kafka_cluster_idRestart the connector and its tasks. Stops message processing until the connector and tasks are restart. This call is asynchronous and the connector will not transition to another state at the same time.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
connector_namestringThe unique name of the connector.
environment_idstringThe unique identifier of the environment this resource belongs to.
kafka_cluster_idstringThe unique identifier for the Kafka cluster.
expandstring- id : Returns metadata of each connector such as id and id type. - info : Returns metadata of each connector such as the configuration, task information, and type of connector. - status : Returns additional state information of each connector including their status and tasks.

SELECT examples

Get information about the connector.

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

INSERT examples

Create a new connector. Returns the new connector information if successful.

INSERT INTO confluent.connect.connectors (
name,
config,
offsets,
environment_id,
kafka_cluster_id
)
SELECT
'{{ name }}',
'{{ config }}',
'{{ offsets }}',
'{{ environment_id }}',
'{{ kafka_cluster_id }}'
RETURNING
name,
config,
offsets,
tasks,
type
;

DELETE examples

Delete a connector. Halts all tasks and deletes the connector configuration.

DELETE FROM confluent.connect.connectors
WHERE connector_name = '{{ connector_name }}' --required
AND environment_id = '{{ environment_id }}' --required
AND kafka_cluster_id = '{{ kafka_cluster_id }}' --required
;

Lifecycle Methods

Retrieve an object with the queried expansions of all connectors. Without expand query parameter, this list connector’s endpoint will return a list of only the connector names.

EXEC confluent.connect.connectors.list_connectv1_connectors_with_expansions
@environment_id='{{ environment_id }}' --required,
@kafka_cluster_id='{{ kafka_cluster_id }}' --required,
@expand='{{ expand }}'
;