-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-14266 - Allow ExecuteSQL to not overwrite flowfile content when no result #9748
base: main
Are you sure you want to change the base?
Conversation
...tandard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java
Outdated
Show resolved
Hide resolved
...tandard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java
Outdated
Show resolved
Hide resolved
...tandard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java
Outdated
Show resolved
Hide resolved
416b7ed
to
c1f67e2
Compare
…no result Co-authored-by: Marcin Gemra <[email protected]>
c1f67e2
to
4027d8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking up these changes @sfc-gh-mgemra, this looks good except for one remaining detail regarding the value and displayName for the enum.
...tandard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java
Outdated
Show resolved
Hide resolved
...tandard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java
Outdated
Show resolved
Hide resolved
79d0f0e
to
6dbe6dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the adjustments @sfc-gh-mgemra. On final review, I noticed the property value comparison could be simplified, and I also adjusted the described value display names to Empty
and Original
in order to align more closely with the actual behavior.
Planning to merge pending successful automated builds.
Summary
NIFI-14266 - Allow ExecuteSQL to not overwrite flowfile content when no result
The ExecuteSQL processor may be used in a flow definition to execute SQL statements such as TRUNCATE TABLE, DROP TABLE, etc. While there is the option to use pre/post queries, it might not always be an option to have everything executed within the same processor. In such a scenario, it might be needed to not change the content of the FlowFile.
This improvement adds a property allowing a user to specify that the FlowFile's content should remain untouched when the execution of the query does not generate any result and, of course, when the processor was triggered by an incoming FlowFile.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation