@@ -107,6 +107,13 @@ public class JdbcSourceConnectorConfig extends AbstractConfig {
107
107
"Prefix to prepend to table names to generate the name of the Kafka topic to publish data "
108
108
+ "to, or in the case of a custom query, the full name of the topic to publish to." ;
109
109
110
+ public static final String VALIDATE_NON_NULL_CONFIG = "validate.non.null" ;
111
+ private static final String VALIDATE_NON_NULL_DOC =
112
+ "By default, the JDBC connector will validate that all incrementing and timestamp tables have NOT NULL set for "
113
+ + "the columns being used as their ID/timestamp. If the tables don't, JDBC connector will fail to start. Setting "
114
+ + "this to false will disable these checks." ;
115
+ public static final boolean VALIDATE_NON_NULL_DEFAULT = true ;
116
+
110
117
public static ConfigDef baseConfigDef () {
111
118
return new ConfigDef ()
112
119
.define (CONNECTION_URL_CONFIG , Type .STRING , Importance .HIGH , CONNECTION_URL_DOC )
@@ -132,7 +139,9 @@ public static ConfigDef baseConfigDef() {
132
139
.define (QUERY_CONFIG , Type .STRING , QUERY_DEFAULT ,
133
140
Importance .MEDIUM , QUERY_DOC )
134
141
.define (TOPIC_PREFIX_CONFIG , Type .STRING ,
135
- Importance .HIGH , TOPIC_PREFIX_DOC );
142
+ Importance .HIGH , TOPIC_PREFIX_DOC )
143
+ .define (VALIDATE_NON_NULL_CONFIG , Type .BOOLEAN , VALIDATE_NON_NULL_DEFAULT ,
144
+ Importance .LOW , VALIDATE_NON_NULL_DOC );
136
145
}
137
146
138
147
static ConfigDef config = baseConfigDef ();
0 commit comments