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]: text file output changes data type #4814

Closed
bander-r opened this issue Jan 23, 2025 · 2 comments
Closed

[Bug]: text file output changes data type #4814

bander-r opened this issue Jan 23, 2025 · 2 comments
Labels

Comments

@bander-r
Copy link

bander-r commented Jan 23, 2025

Apache Hop version?

2.11

Java version?

21.0.5

Operating system

Windows

What happened?

My transformation has a field of data type "string". Most values are whole numbers but there are a few exceptions containing letters.

On text file output (field set to string) only the numeric values are written, those containing non numeral characters are left blank.

This only occurs if there is a lot of lines without non numerals first. In my example the first value with non numerals is in line 350.

The screenshots show the data being displayed correctly in the output preview but not written correctly (opened the csv with excel)
Image
Image

Image

It seems HOP tries to determine the data type from the first X lines instead of using the type determined in the fields section. Then values unfit for the determined type (String to Int) are skipped.

Thanks in advance:)

Issue Priority

Priority: 3

Issue Component

Component: Hop Gui

@hansva
Copy link
Contributor

hansva commented Jan 23, 2025

are you sure it isn't Excel that is doing that?
On the text file output, we do not guess output types if you specify a string it will be written as a string, well actually everything is a string as we are writing to a textile.

Could you provide a sample dataset to reproduce the issue? Then we can take a look at what is happening as I am fairly sure if anyone takes up this ticket the answer will be "works on my machine"

@bander-r
Copy link
Author

Hey thanks! You guessed correctly. The Error is within Excel not Hop.
It was excel that determined the data type by looking only at the first 200 lines then started ignoring anything unfit for that type.

@hansva hansva added this to the Not Applicable - 2025 milestone Jan 23, 2025
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