Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2162#discussion_r143279372
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryDatabaseTable.java
---
@@ -175,6 +181,32 @@ public QueryDatabaseTable() {
return propDescriptors;
}
+ @Override
+ protected Collection<ValidationResult>
customValidate(ValidationContext validationContext) {
+ final List<ValidationResult> results = new
ArrayList<>(super.customValidate(validationContext));
+
+ final String tableName =
validationContext.getProperty(TABLE_NAME).getValue();
+ final String sqlQuery =
validationContext.getProperty(SQL_QUERY).getValue();
+
+ if(!StringUtils.isEmpty(sqlQuery) &&
!StringUtils.isEmpty(tableName)){
+ results.add(new ValidationResult.Builder()
+ .valid(false)
+ .subject("SQL Query")
+ .explanation("SQL Query and Table Name can't both
be specified at the same time.")
--- End diff --
This might need some elaboration, in case the user wouldn't necessarily
understand why they can't both be specified (due to EL support in the Table
Name property, e.g.)
---