Skip to content

NIFI-13531 ExecuteSQLRecord not honouring FlowFile attributes for con…#9909

Merged
exceptionfactory merged 1 commit intoapache:mainfrom
fmaretic:NIFI-13531
Oct 24, 2025
Merged

NIFI-13531 ExecuteSQLRecord not honouring FlowFile attributes for con…#9909
exceptionfactory merged 1 commit intoapache:mainfrom
fmaretic:NIFI-13531

Conversation

@fmaretic
Copy link
Contributor

@fmaretic fmaretic commented May 1, 2025

…figured RecordWriter.

Summary

NIFI-13531

These are the following changes:

  • New MockCsvRecordWriter utility class with a fluent builder and an option to configure a dynamic separator.
  • Changes to existing MockRecordWriter class to support dynamic separators.
  • Bugfix in the RecordSqlWriter class that was providing an empty Map instead of the original attributes when constructing a RecordSetWriter.

One thing to note here is that this could (in theory) break some existing flows if the users are aware of the issue and made some workarounds for it. This is in fact a breaking change if the users are not relying on this behavior.

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

@joewitt
Copy link
Contributor

joewitt commented Jun 21, 2025

@markap14 This change looks good to me and the tests seem helpful. Can you review as I dont think I appreciate the potentially breaking nature of it in carrying through attributes...

@github-actions
Copy link

Automated review is marking this PR as stale due to lack of updates in the past four months. This PR will be closed in 15 days if the stale label is not removed. This stale label and automated closure does not indicate a judgement of the PR, just lack of reviewer bandwidth and helps us keep the PR queue more manageable. If you would like this PR re-opened you can do so and a committer can remove the stale label. Or you can open a new PR. Try to help review other PRs to increase PR review bandwidth which in turn helps yours.

@github-actions github-actions bot added the Stale label Oct 20, 2025
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 the work on this @fmaretic. The updated Mock Writer is useful as shown in the new test method. I'm in favor of moving forward with this change to the RecordSqlWriter. Can you rebase the pull request to resolve the current merge conflict?

@fmaretic
Copy link
Contributor Author

Hello @exceptionfactory , I have rebased the branch.

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 again @fmaretic! +1 merging

@exceptionfactory exceptionfactory merged commit 3755a64 into apache:main Oct 24, 2025
7 checks passed
awelless pushed a commit to awelless/nifi that referenced this pull request Nov 5, 2025
…nfigured RecordWriter (apache#9909)

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants