@@ -42,6 +42,7 @@ public class ToolOptions {
4242 private Boolean help = false ;
4343 private Boolean version = false ;
4444 private Boolean verbose = false ;
45+ private Boolean quotedIdentifiers = false ;
4546 private String optionsFile ;
4647
4748 private String mode = DEFAULT_MODE ;
@@ -286,6 +287,13 @@ private void checkOptions(String[] args) throws ParseException, IOException {
286287 Option verboseOpt = new Option ("v" , "verbose" , false , "Print more information while working" );
287288 options .addOption (verboseOpt );
288289
290+ options .addOption (
291+ Option .builder ()
292+ .longOpt ("quoted-identifiers" )
293+ .desc ("Should all database identifiers be quoted." )
294+ .build ()
295+ );
296+
289297
290298 // create the command line parser
291299 CommandLineParser parser = new DefaultParser ();
@@ -312,6 +320,7 @@ private void checkOptions(String[] args) throws ParseException, IOException {
312320 if (line .hasOption ("sink-disable-escape" )) setSinkDisableEscapeNotNull (true );
313321 if (line .hasOption ("sink-disable-truncate" )) setSinkDisableTruncateNotNull (true );
314322 if (line .hasOption ("sink-analyze" )) setSinkAnalyzeNotNull (true );
323+ if (line .hasOption ("quoted-identifiers" )) setQuotedIdentifiers (true );
315324
316325 setModeNotNull (line .getOptionValue ("mode" ));
317326 setSinkColumnsNotNull (line .getOptionValue ("sink-columns" ));
@@ -426,6 +435,7 @@ private void loadOptionsFile() throws IOException {
426435 setJobs (prop .getProperty ("jobs" ));
427436 setFetchSize (prop .getProperty ("fetch.size" ));
428437 setBandwidthThrottling (prop .getProperty ("bandwidth.throttling" ));
438+ setQuotedIdentifiers (Boolean .parseBoolean (prop .getProperty ("quoted.identifiers" )));
429439
430440 // Connection params
431441 setSinkConnectionParams (of .getSinkConnectionParams ());
@@ -828,6 +838,7 @@ public String toString() {
828838 ",\n \t sinkAnalyze=" + sinkAnalyze +
829839 ",\n \t jobs=" + jobs +
830840 ",\n \t bandwidthThrottling=" + bandwidthThrottling +
841+ ",\n \t quotedIdentifiers=" + quotedIdentifiers +
831842 ",\n \t fetchSize=" + fetchSize +
832843 ",\n \t help=" + help +
833844 ",\n \t version=" + version +
@@ -860,4 +871,12 @@ public void setBandwidthThrottlingNotNull(String bandwidthThrottling) {
860871 if (bandwidthThrottling != null && !bandwidthThrottling .isEmpty ())
861872 setBandwidthThrottling (bandwidthThrottling );
862873 }
874+
875+ public Boolean getQuotedIdentifiers () {
876+ return quotedIdentifiers ;
877+ }
878+
879+ public void setQuotedIdentifiers (Boolean quotedIdentifiers ) {
880+ this .quotedIdentifiers = quotedIdentifiers ;
881+ }
863882}
0 commit comments