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

[Feature] Feature/3287 - Enable Generating Arrays Inside JSON for Grouped Values #3289

Merged
merged 4 commits into from
Nov 14, 2023

Conversation

vdwals
Copy link
Contributor

@vdwals vdwals commented Oct 6, 2023

Description:
This pull request introduces the ability to generate arrays inside a generated JSON, providing enhanced flexibility for handling grouped values. This addresses #3287

Changes:

  1. New Flag: A new flag has been added to the initial settings screen, with a default value of 'false.' This addition ensures backward compatibility, as existing jobs remain unaffected.
  2. Modified JSON Result for Grouped Values: Previously, when generating a JSON result for grouped values, the output was an array of JSON objects collected per group. With this update, if the flag is activated, the new result will create a single JSON result in the case of grouping. Inside this element, all non-grouping key fields will be collected in an array.
  3. No Additional Dependencies: These changes do not introduce any additional external dependencies.
  4. Preservation of Current Behavior: Importantly, these modifications do not alter the current behavior, ensuring compatibility with existing workflows.

These changes enhance the versatility of JSON generation while maintaining compatibility with previous configurations.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@vdwals vdwals marked this pull request as ready for review October 6, 2023 08:59
@hansva hansva self-requested a review October 13, 2023 09:39
@mattcasters
Copy link
Contributor

It would be great if you could add an integration test for this transform. Perhaps add it to number 68:

https://github.com/apache/hop/tree/master/integration-tests/transforms

This way we can lock in the new functionality. If you suspect an impact on other functionality, more than 1 test would be appreciated.

@hansva
Copy link
Contributor

hansva commented Nov 14, 2023

Awesome work! sorry about the delay!

@hansva hansva merged commit c596527 into apache:master Nov 14, 2023
2 checks passed
@vdwals vdwals deleted the feature/3287 branch November 14, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants