New topic testmd is created
$KAFKA_HOME/bin/kafka-topics.sh --create --topic **testmd** --replication-factor 3 --partitions 3 --zookeeper rhes75:2181,rhes564:2181,rhes76:2181
Created topic testmd.
This is the content of the standalone file
cat etc/connect-standalone.properties
bootstrap.servers=rhes75:9092,rhes75:9093,rhes75:9094,rhes564:9092,rhes564:9093,rhes564:9094,rhes76:9092,rhes76:9093,rhes76:9094
key.converter=org.apache.kafka.connect.storage.StringConverter
#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=true
offset.storage.file.filename=/tmp/connect_bq.offsets
offset.flush.interval.ms=10000
plugin.path=/d4T/hduser/bigquery-kafka-connect-sink/share/kafka/plugins
This is the content of sink property file
name=bigquery-sink
connector.type=bigquery-connector
connector.class=com.wepay.kafka.connect.bigquery.BigQuerySinkConnector
defaultDataset=test
project=project_name
topics=testmd
autoCreateTables=false
gcsBucketName=tmp_storage_bucket
queueSize=-1
bigQueryRetry=0
bigQueryRetryWait=1000
bigQueryMessageTimePartitioning=false
bigQueryPartitionDecorator=true
timePartitioningType=DAY
keySource=FILE
keyfile=xyz.json
sanitizeTopics=false
schemaRetriever=com.wepay.kafka.connect.bigquery.retrieve.IdentitySchemaRetriever
threadPoolSize=10
allBQFieldsNullable=false
avroDataCacheSize=100
batchLoadIntervalSec=120
convertDoubleSpecialValues=false
enableBatchLoad=false
upsertEnabled=false
deleteEnabled=false
mergeIntervalMs=60000
mergeRecordsThreshold=-1
autoCreateBucket=true
allowNewBigQueryFields=false
allowBigQueryRequiredFieldRelaxation=false
allowSchemaUnionization=false
kafkaDataFieldName=null
kafkaKeyFieldName=null
Created same random test data feeding it into topic testmd now
$KAFKA_HOME/bin/kafka-console-consumer.sh --bootstrap-server $bootstrapservers --from-beginning --topic testmd --property print.key=true
4b1201a3-a12c-429a-84ab-a56625c42410 {"schema": { "type": "struct", "fields": [ { "field": "rowkey", "type": "string", "optional": true}],"optional": false,"name": "test.md"}, "payload": {"rowkey": "4b1201a3-a12c-429a-84ab-a56625c42410"}}
Again the same error running connector
com.wepay.kafka.connect.bigquery.exception.ConversionConnectException: Top-level Kafka Connect schema must be of type 'struct'
And this the run of kafka-consumer-groups.sh
/d4T/hduser/bigquery-kafka-connect-sink> 5:9092,rhes75:9093,rhes75:9094,rhes564:9092,rhes564:9093,rhes564:9094,rhes76:9092,rhes76:9093,rhes76:9094 --describe --all-groups <
Consumer group 'connect-bigquery-sink' has no active members.
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID HOST CLIENT-ID
console-consumer-24314 testmd 0 - 0 - consumer-console-consumer-24314-1-2fb0573c-4469-41af-9e6c-3b32bc585abb /50.140.197.220 consumer-console-consumer-24314-1
console-consumer-24314 testmd 1 - 1 - consumer-console-consumer-24314-1-2fb0573c-4469-41af-9e6c-3b32bc585abb /50.140.197.220 consumer-console-consumer-24314-1
console-consumer-24314 testmd 2 - 0 - consumer-console-consumer-24314-1-2fb0573c-4469-41af-9e6c-3b32bc585abb /50.140.197.220 consumer-console-consumer-24314-1