Skip to content

NIFI-15024 - Add executed query as a FlowFile attribute for ExecuteSQL and ExecuteSQLRecord#10392

Merged
exceptionfactory merged 1 commit intoapache:mainfrom
pvillard31:NIFI-15024
Oct 6, 2025
Merged

NIFI-15024 - Add executed query as a FlowFile attribute for ExecuteSQL and ExecuteSQLRecord#10392
exceptionfactory merged 1 commit intoapache:mainfrom
pvillard31:NIFI-15024

Conversation

@pvillard31
Copy link
Contributor

Summary

NIFI-15024 - Add executed query as a FlowFile attribute for ExecuteSQL and ExecuteSQLRecord

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 ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

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

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 proposing this addition @pvillard31.

The implementation looks good, but it does raise the question of large attribute values. Logging the SQL is one thing, but adding it as an output attribute is another. If the goal is simply for troubleshooting, I'm not sure that is sufficient to warrant the addition, as useful as it could be. Making it an optional addition with a new property could work, although that seems to introduce unnecessary complexity. Do you have any concerns about the attribute size, or use cases outside of troubleshooting?

@pvillard31
Copy link
Contributor Author

Thanks for the feedback @exceptionfactory - I decided to just switch the log statement to info as a good first step and we can revisit later if it's not enough.

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 @pvillard31, changing the log level seems like a better approach under the circumstances. Since WARN is the default level, this avoids changing default behavior, but makes it easier to enable logging SQL statements without additional debug details. +1 merging

@exceptionfactory exceptionfactory merged commit 1675071 into apache:main Oct 6, 2025
6 checks passed
@exceptionfactory exceptionfactory added the hacktoberfest-accepted Hacktoberfest Accepted label Oct 6, 2025
awelless pushed a commit to awelless/nifi that referenced this pull request Nov 5, 2025
…pache#10392)

Signed-off-by: David Handermann <exceptionfactory@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Hacktoberfest Accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants