NIFI-9983 Add output relation name attribute in QueryRecord processor#6011
NIFI-9983 Add output relation name attribute in QueryRecord processor#6011markap14 merged 2 commits intoapache:mainfrom
Conversation
|
Is it possible to add/update unit tests to verify your changes? |
|
I don't know if I did too much or not enough. If it's the latter, fell free to tell me. |
Thanks, this LGTM |
pvillard31
left a comment
There was a problem hiding this comment.
I'm a bit confused by this change. You're adding the attribute to the original flow file but one could configure many dynamic properties with different queries and there could be many different relationships (one per query). I don't think the change makes sense given how the processor can be used.
I'm adding the attibrute to the original flow file in two cases: when the flow file goes in failure queue and in original queue but when the flow file goes to "query" queue and becomes a "transformed" flow file, I add the attribute with name of the "query queue". To summarise:
I did this to copy what is done in RouteOnAttribute to have an attribute to use to factor out part of the process after the processor with a condition on that attribute. I'm not sure if its clearer? |
pvillard31
left a comment
There was a problem hiding this comment.
OK understood @juldrixx, it makes sense, I did look at the code changes a bit too fast
.../nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java
Show resolved
Hide resolved
|
Thanks @juldrixx changes look good to me. I'm a +1, will merge to main. |
Summary
_NIFI-9983 updates the QueryRecord processor to write in the output flowfile the name of the destination route as it's done the RouteOnAttribute processor.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-0000NIFI-0000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation