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

    https://github.com/apache/nifi/pull/2162#discussion_r166296034
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryDatabaseTable.java
 ---
    @@ -150,8 +151,13 @@ public QueryDatabaseTable() {
             final List<PropertyDescriptor> pds = new ArrayList<>();
             pds.add(DBCP_SERVICE);
             pds.add(DB_TYPE);
    -        pds.add(TABLE_NAME);
    +        pds.add(new PropertyDescriptor.Builder()
    +                .fromPropertyDescriptor(TABLE_NAME)
    +                .description("The name of the database table to be 
queried. When a custom query is used, this property is used to alias the query 
and appears as an attribute on the FlowFile.")
    +                .build());
    --- End diff --
    
    Please update `AbstractDatabaseFetchProcessor.onPropertyModified` so that 
it clears `setupComplete` flag when this TABLE_NAME property is updated, too. 
Without that, when a custom query is used, `columnTypeMap` will not be 
populated again if the processor is reconfigured with different table name 
alias and restarted, that prevent the maxValueColumn to be captured correctly, 
and produce duplicated query result over and over.


---

Reply via email to