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 {
118
118
119
119
if (isImportQuerySelected && !sourceConfig .containsMacro (IMPORT_QUERY ) &&
120
120
Strings .isNullOrEmpty (sourceConfig .getImportQuery ())) {
121
- collector .addFailure ("Import Query cannot be empty" , null )
121
+ collector .addFailure ("Import Query is empty. " , "Specify the Import Query." )
122
122
.withConfigProperty (IMPORT_QUERY );
123
123
124
124
} else if (!isImportQuerySelected && !sourceConfig .containsMacro (TABLE_NAME ) &&
125
125
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." )
127
127
.withConfigProperty (TABLE_NAME );
128
128
}
129
129
} else {
130
130
if (!sourceConfig .containsMacro (IMPORT_QUERY ) &&
131
131
Strings .isNullOrEmpty (sourceConfig .getImportQuery ()) &&
132
132
!sourceConfig .containsMacro (TABLE_NAME ) &&
133
133
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'" )
135
136
.withConfigProperty (IMPORT_QUERY )
136
137
.withConfigProperty (TABLE_NAME );
137
138
}
Original file line number Diff line number Diff line change @@ -155,18 +155,18 @@ public void validate(FailureCollector collector) {
155
155
boolean isImportQuerySelected = importQueryType == ImportQueryType .IMPORT_QUERY ;
156
156
if (isImportQuerySelected && !containsMacro (IMPORT_QUERY ) &&
157
157
Strings .isNullOrEmpty (importQuery )) {
158
- collector .addFailure ("Import Query cannot be empty." , null )
158
+ collector .addFailure ("Import Query is empty." , "Specify the Import Query." )
159
159
.withConfigProperty (IMPORT_QUERY );
160
160
161
161
} else if (!isImportQuerySelected && !containsMacro (TABLE_NAME ) &&
162
162
Strings .isNullOrEmpty (tableName )) {
163
- collector .addFailure ("Import Query cannot be empty" , null )
163
+ collector .addFailure ("Import Query is empty. " , "Specify the Import Query." )
164
164
.withConfigProperty (TABLE_NAME );
165
165
}
166
166
} else {
167
167
if (!containsMacro (IMPORT_QUERY ) && Strings .isNullOrEmpty (importQuery ) &&
168
168
!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." )
170
170
.withConfigProperty (IMPORT_QUERY )
171
171
.withConfigProperty (TABLE_NAME );
172
172
}
Original file line number Diff line number Diff line change @@ -80,19 +80,20 @@ public void configurePipeline(PipelineConfigurer pipelineConfigurer) {
80
80
boolean isImportQuerySelected = importQueryType == ImportQueryType .IMPORT_QUERY ;
81
81
if (isImportQuerySelected && !sourceConfig .containsMacro (IMPORT_QUERY ) &&
82
82
Strings .isNullOrEmpty (sourceConfig .getImportQuery ())) {
83
- collector .addFailure ("Import Query cannot be empty" , null )
83
+ collector .addFailure ("Import Query is empty. " , "Specify the Import Query." )
84
84
.withConfigProperty (IMPORT_QUERY );
85
85
86
86
} else if (!isImportQuerySelected && !sourceConfig .containsMacro (TABLE_NAME ) &&
87
87
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." )
89
89
.withConfigProperty (TABLE_NAME );
90
90
}
91
91
} else {
92
92
if (!sourceConfig .containsMacro (IMPORT_QUERY ) &&
93
93
Strings .isNullOrEmpty (sourceConfig .getImportQuery ()) && !sourceConfig .containsMacro (TABLE_NAME ) &&
94
94
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'" )
96
97
.withConfigProperty (IMPORT_QUERY )
97
98
.withConfigProperty (TABLE_NAME );
98
99
}
You can’t perform that action at this time.
0 commit comments