confluentinc / confluentinc/examples
Salesforce Sink SObject Connector - Error Bad Kafka SinkRecord. Value is not of type Struct. Kafka topics are not in the format the connector is expecting.
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I just wondering if you could help with my issue when pushing JSON data to my topic **sf_insert_account_out**, the Salesforce Sink Sobject Connector throws this error:
**Bad Kafka SinkRecord Value is not of type Struct. Kafka topics are not in the format the connector is expecting.**
This is the JSON input i've used (I tried different JSON input structure however i'm getting the same error.):
curl -X POST -H "Content-Type: application/vnd.kafka.json.v2+json" \
-H "Accept: application/vnd.kafka.v2+json" \
--data '{ "records":[{"value": { "payload": { "Name": { "string": "Enrico Dela Cruz" }, "_ObjectType": { "string": "Account" }, "_EventType": { "string":"create"}}}}]}' "http://localhost:8082/topics/sf_insert_account_out"
**Here's the Salesforce Sink SObject Connector configuration (To create a new Account in Salesforce):**
name=sf-insert-account-sink-connector
connector.class=io.confluent.salesforce.SalesforceSObjectSinkConnector
key.converter=org.apache.kafka.connect.json.JsonConverter
key.converter.schemas.enable=false
value.converter=org.apache.kafka.connect.json.JsonConverter
value.converter.schemas.enable=false
tasks.max=1
topics=sf_insert_account_out
salesforce.consumer.key=
salesforce.consumer.secret=
salesforce.username=sf-dev@gmail.com
salesforce.password=
salesforce.password.token=uOs9dgBxLkvWqJFZtef5ZHfJA
salesforce.instance=https://login.salesforce.com
salesforce.object=Account
confluent.topic.bootstrap.servers=localhost:9092
confluent.topic.replication.factor=1
confluent.license=
I'm using an On-Premise Confluent Platform (local)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.