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

[Bug]: Null If transform does not "nullify" empty fields #2024

Closed
campen opened this issue Dec 8, 2022 · 7 comments
Closed

[Bug]: Null If transform does not "nullify" empty fields #2024

campen opened this issue Dec 8, 2022 · 7 comments
Assignees
Labels
Milestone

Comments

@campen
Copy link
Contributor

campen commented Dec 8, 2022

NullIfTransform.txt
NullIfTransform.zip

Apache Hop version?

2.2, 2.3

Java version?

11.0.15 (aarch64 java)

Operating system

macOS, Linux

What happened?

Prior to 2.2, the null If steps converted empty strings to null, but in 2.2 it does not work anymore. See attached .hpl with example. It works without issue in 2.1 and will not work properly in 2.2

Issue Priority

Priority: 1

Issue Component

Component: Transforms

@nadment
Copy link
Contributor

nadment commented Dec 8, 2022

Under Windows, everything works as expected?
image

Do you have other results ?

@campen
Copy link
Contributor Author

campen commented Dec 8, 2022

Screen Shot 2022-12-08 at 2 19 11 PM

Here are my results

@campen
Copy link
Contributor Author

campen commented Dec 10, 2022

Note: this is a blocker for me to move beyond 2.1

@nadment
Copy link
Contributor

nadment commented Dec 10, 2022

@campen what is the value of the variable HOP_EMPTY_STRING_DIFFERS_FROM_NULL, this could explain the difference ?

@campen
Copy link
Contributor Author

campen commented Dec 10, 2022

@nadment - it is set to "Y" for both versions (2.1 and 2.2/3) - I double checked that initially as I thought it may have changed when I opened 2.2, but I am using the same config file (system env variable set), so all settings are the same no matter what version of Hop I am using. Also note that it behaves the same using Ubuntu Linux.

@nadment nadment self-assigned this Dec 10, 2022
@nadment nadment added this to the 2.3 milestone Dec 10, 2022
@nadment
Copy link
Contributor

nadment commented Dec 10, 2022

If you think about it, this variable HOP_EMPTY_STRING_DIFFERS_FROM_NULL has no meaning in this transformation. The only useful case is to replace an empty string by a null. I try a fix without this variable.

@campen
Copy link
Contributor Author

campen commented Dec 11, 2022

Thanks! Let me know and I am happy to test it out. I agree about that variable having no impact on this transform. I have different projects that look at empty and null as different (which is by my design).

hansva added a commit to nadment/hop that referenced this issue Dec 15, 2022
@hansva hansva closed this as completed in 290b19b Dec 15, 2022
hansva added a commit that referenced this issue Dec 15, 2022
Fix #2024 : Null If transform does not "nullify" empty field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants