Skip to content

Commit 8adaca0

Browse files
author
Bingqin Zhou
committed
Make changes according to comments.
1 parent dfbc32f commit 8adaca0

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

kcbq-api/src/main/java/com/wepay/kafka/connect/bigquery/api/KafkaSchemaRecordType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package com.wepay.kafka.connect.bigquery.api;
22

33

4+
/**
5+
* Enum class for Kafka schema or record type, either value or key.
6+
*/
47
public enum KafkaSchemaRecordType {
58

69
VALUE("value"),

kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/SchemaManager.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
package com.wepay.kafka.connect.bigquery;
22

33

4-
import com.google.cloud.bigquery.*;
4+
import com.google.cloud.bigquery.BigQuery;
5+
import com.google.cloud.bigquery.Field;
6+
import com.google.cloud.bigquery.LegacySQLTypeName;
7+
import com.google.cloud.bigquery.StandardTableDefinition;
8+
import com.google.cloud.bigquery.TableId;
9+
import com.google.cloud.bigquery.TableInfo;
10+
import com.google.cloud.bigquery.TimePartitioning;
511
import com.wepay.kafka.connect.bigquery.api.KafkaSchemaRecordType;
612
import com.wepay.kafka.connect.bigquery.api.SchemaRetriever;
713
import com.wepay.kafka.connect.bigquery.convert.KafkaDataBuilder;

kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/config/BigQuerySinkConfig.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,15 +574,23 @@ public SchemaRetriever getSchemaRetriever() {
574574

575575
/**
576576
*
577-
* @return An optional class of KafkaKeyFieldName.
577+
* If the connector is configured to load Kafka data into BigQuery, this config defines
578+
* the name of the kafka data field. A structure is created under the field name to contain
579+
* kafka data schema including topic, offset, partition and insertTime.
580+
*
581+
* @return Field name of Kafka Data to be used in BigQuery
578582
*/
579583
public Optional<String> getKafkaKeyFieldName() {
580584
return Optional.ofNullable(getString(KAFKA_KEY_FIELD_NAME_CONFIG));
581585
}
582586

583587
/**
584588
*
585-
* @return An optional class of KafkaDataFieldName.
589+
* If the connector is configured to load Kafka keys into BigQuery, this config defines
590+
* the name of the kafka key field. A structure is created under the field name to contain
591+
* a topic's Kafka key schema.
592+
*
593+
* @return Field name of Kafka Key to be used in BigQuery
586594
*/
587595
public Optional<String> getKafkaDataFieldName() {
588596
return Optional.ofNullable(getString(KAFKA_DATA_FIELD_NAME_CONFIG));

0 commit comments

Comments
 (0)