Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.2 kB
1
Indexable
Never
curl -X POST \
-H "Content-Type: application/json" \
--data '{
"name": "Driver-Connector-Avro",
"config": {
"connector.class":
"io.confluent.connect.jdbc.JdbcSourceConnector",
"connection.url":
"jdbc:postgresql://postgres:5432/postgres",
"connection.user": "postgres",
"table.whitelist": "driver",
"topic.prefix": "",
"mode":"timestamp+incrementing",
"incrementing.column.name": "id",
"timestamp.column.name": "timestamp",
"table.types": "TABLE",
"numeric.mapping": "best_fit",
"key.converter":
"org.apache.kafka.connect.storage.StringConverter",
"value.converter":
"io.confluent.connect.avro.AvroConverter",
"value.converter.schema.registry.url": "http://schemaregistry:
8081",
"transforms": "suffix,createKey,extractKey",
"transforms.suffix.type":"org.apache.kafka.connect.transforms.Rege
xRouter",
"transforms.suffix.regex":"(.*)",
"transforms.suffix.replacement":"$1-profiles-avro",
"transforms.createKey.type":
"org.apache.kafka.connect.transforms.ValueToKey",
"transforms.createKey.fields": "driverkey",
"transforms.extractKey.type":
"org.apache.kafka.connect.transforms.ExtractField$Key",
"transforms.extractKey.field": "driverkey"
}
}' http://connect:8083/connectors