File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
amazon-redshift-plugin/src/main/java/io/cdap/plugin/amazon/redshift
database-commons/src/main/java/io/cdap/plugin/db/config
postgresql-plugin/src/main/java/io/cdap/plugin/postgres Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -118,20 +118,21 @@ public void prepareRun(BatchSourceContext context) throws Exception {
118118
119119 if (isImportQuerySelected && !sourceConfig .containsMacro (IMPORT_QUERY ) &&
120120 Strings .isNullOrEmpty (sourceConfig .getImportQuery ())) {
121- collector .addFailure ("Import Query cannot be empty" , null )
121+ collector .addFailure ("Import Query is empty. " , "Specify the Import Query." )
122122 .withConfigProperty (IMPORT_QUERY );
123123
124124 } else if (!isImportQuerySelected && !sourceConfig .containsMacro (TABLE_NAME ) &&
125125 Strings .isNullOrEmpty (sourceConfig .getTableName ())) {
126- collector .addFailure ("Table Name cannot be empty" , null )
126+ collector .addFailure ("Table Name cannot be empty" , "Specify the Table Name." )
127127 .withConfigProperty (TABLE_NAME );
128128 }
129129 } else {
130130 if (!sourceConfig .containsMacro (IMPORT_QUERY ) &&
131131 Strings .isNullOrEmpty (sourceConfig .getImportQuery ()) &&
132132 !sourceConfig .containsMacro (TABLE_NAME ) &&
133133 Strings .isNullOrEmpty (sourceConfig .getTableName ())) {
134- collector .addFailure ("Either 'Import Query' or 'Table Name' must be provided." , null )
134+ collector .addFailure ("Either 'Import Query' or 'Table Name' must be provided." ,
135+ "Please provide Either 'Import Query' or 'Table Name'" )
135136 .withConfigProperty (IMPORT_QUERY )
136137 .withConfigProperty (TABLE_NAME );
137138 }
Original file line number Diff line number Diff line change @@ -155,18 +155,18 @@ public void validate(FailureCollector collector) {
155155 boolean isImportQuerySelected = importQueryType == ImportQueryType .IMPORT_QUERY ;
156156 if (isImportQuerySelected && !containsMacro (IMPORT_QUERY ) &&
157157 Strings .isNullOrEmpty (importQuery )) {
158- collector .addFailure ("Import Query cannot be empty." , null )
158+ collector .addFailure ("Import Query is empty." , "Specify the Import Query." )
159159 .withConfigProperty (IMPORT_QUERY );
160160
161161 } else if (!isImportQuerySelected && !containsMacro (TABLE_NAME ) &&
162162 Strings .isNullOrEmpty (tableName )) {
163- collector .addFailure ("Import Query cannot be empty" , null )
163+ collector .addFailure ("Import Query is empty. " , "Specify the Import Query." )
164164 .withConfigProperty (TABLE_NAME );
165165 }
166166 } else {
167167 if (!containsMacro (IMPORT_QUERY ) && Strings .isNullOrEmpty (importQuery ) &&
168168 !containsMacro (TABLE_NAME ) && Strings .isNullOrEmpty (tableName )) {
169- collector .addFailure ("Import Query cannot be empty" , null )
169+ collector .addFailure ("Import Query is empty. " , "Specify the Import Query." )
170170 .withConfigProperty (IMPORT_QUERY )
171171 .withConfigProperty (TABLE_NAME );
172172 }
Original file line number Diff line number Diff line change @@ -80,19 +80,20 @@ public void configurePipeline(PipelineConfigurer pipelineConfigurer) {
8080 boolean isImportQuerySelected = importQueryType == ImportQueryType .IMPORT_QUERY ;
8181 if (isImportQuerySelected && !sourceConfig .containsMacro (IMPORT_QUERY ) &&
8282 Strings .isNullOrEmpty (sourceConfig .getImportQuery ())) {
83- collector .addFailure ("Import Query cannot be empty" , null )
83+ collector .addFailure ("Import Query is empty. " , "Specify the Import Query." )
8484 .withConfigProperty (IMPORT_QUERY );
8585
8686 } else if (!isImportQuerySelected && !sourceConfig .containsMacro (TABLE_NAME ) &&
8787 Strings .isNullOrEmpty (sourceConfig .getTableName ())) {
88- collector .addFailure ("Table Name cannot be empty" , null )
88+ collector .addFailure ("Table Name cannot be empty" , "Specify the Table Name." )
8989 .withConfigProperty (TABLE_NAME );
9090 }
9191 } else {
9292 if (!sourceConfig .containsMacro (IMPORT_QUERY ) &&
9393 Strings .isNullOrEmpty (sourceConfig .getImportQuery ()) && !sourceConfig .containsMacro (TABLE_NAME ) &&
9494 Strings .isNullOrEmpty (sourceConfig .getTableName ())) {
95- collector .addFailure ("Either 'Import Query' or 'Table Name' must be provided." , null )
95+ collector .addFailure ("Either 'Import Query' or 'Table Name' must be provided." ,
96+ " Please provide Either 'Import Query' or 'Table Name'" )
9697 .withConfigProperty (IMPORT_QUERY )
9798 .withConfigProperty (TABLE_NAME );
9899 }
You can’t perform that action at this time.
0 commit comments