Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1937#discussion_r124734510
  
    --- Diff: 
nifi-nar-bundles/nifi-cassandra-bundle/nifi-cassandra-processors/src/main/java/org/apache/nifi/processors/cassandra/QueryCassandra.java
 ---
    @@ -213,13 +308,20 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
                     return;
                 }
             }
    -
    -        final ComponentLog logger = getLogger();
             final String selectQuery = 
context.getProperty(CQL_SELECT_QUERY).evaluateAttributeExpressions(fileToProcess).getValue();
             final long queryTimeout = 
context.getProperty(QUERY_TIMEOUT).evaluateAttributeExpressions(fileToProcess).asTimePeriod(TimeUnit.MILLISECONDS);
             final String outputFormat = 
context.getProperty(OUTPUT_FORMAT).getValue();
             final Charset charset = 
Charset.forName(context.getProperty(CHARSET).evaluateAttributeExpressions(fileToProcess).getValue());
             final StopWatch stopWatch = new StopWatch(true);
    +        final String waterMarkDateField = 
context.getProperty(DATE_FIELD).getValue();
    +        final String tableName = 
context.getProperty(TABLE_NAME).getValue();
    +        final String keySpace = 
context.getProperty(KEYSPACE).evaluateAttributeExpressions(fileToProcess).getValue();
    +
    +        if ( StringUtils.isEmpty(selectQuery) && 
StringUtils.isEmpty(tableName) ) {
    --- End diff --
    
    I think this should be evaluated in customValidate() method instead of 
onTrigger().


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to