File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
marklogic-data-hub/src/main/java/com/marklogic/hub/step/impl Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,9 @@ public RunStepResponse run() {
282282 inputFilePath = (String )fileLocation .get ("inputFilePath" );
283283 inputFileType = (String )fileLocation .get ("inputFileType" );
284284 outputURIReplacement = (String )fileLocation .get ("outputURIReplacement" );
285+ if (inputFileType .equalsIgnoreCase ("csv" ) && fileLocation .get ("separator" ) != null ) {
286+ this .separator =((String ) fileLocation .get ("separator" )).trim ();
287+ }
285288
286289 if (stepConfig .get ("batchSize" ) != null ){
287290 this .batchSize = Integer .parseInt (stepConfig .get ("batchSize" ).toString ());
@@ -305,11 +308,13 @@ public RunStepResponse run() {
305308 throw new IllegalArgumentException ("Invalid argument for file type " + inputFileType + ". When specifying a separator, the file type must be 'csv'" );
306309 }
307310 this .separator = ((String ) fileLocation .get ("separator" )).trim ();
308- if (separator .equalsIgnoreCase ("\\ t" )) {
309- separator = "\t " ;
310- }
311311 }
312312 }
313+
314+ if (separator != null && separator .equalsIgnoreCase ("\\ t" )) {
315+ this .separator = "\t " ;
316+ }
317+
313318 if (stepConfig .get ("stopOnFailure" ) != null ){
314319 this .withStopOnFailure (Boolean .parseBoolean (stepConfig .get ("stopOnFailure" ).toString ()));
315320 }
You can’t perform that action at this time.
0 commit comments