Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-mgemra
Copy link
Contributor

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

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 21

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@sfc-gh-mgemra sfc-gh-mgemra force-pushed the NIFI-14266 branch 2 times, most recently from 416b7ed to c1f67e2 Compare February 25, 2025 14:32
@sfc-gh-mgemra sfc-gh-mgemra marked this pull request as ready for review February 25, 2025 14:32
Copy link
Contributor

@exceptionfactory exceptionfactory left a 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.

Copy link
Contributor

@exceptionfactory exceptionfactory left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants