You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "hansva (via GitHub)" <gi...@apache.org> on 2023/03/17 14:26:12 UTC
[GitHub] [hop] hansva opened a new issue, #2670: [Bug]: Issues with "Text file output" transform (preceeding blanks; truncation)
hansva opened a new issue, #2670:
URL: https://github.com/apache/hop/issues/2670
### Apache Hop version?
2.4
### Java version?
11
### Operating system
Windows
### What happened?
Migration: https://issues.apache.org/jira/browse/HOP-4078
Using the "Text file output" transform in different contexts leads to problematic behaviour:
Problem I:
if an integer inside the pipeline is read from a parameter that was passed from the workflow, the integer is written to the text file with a preceeding blank (" ") IF the length of field the was set manually (to a too low, correct, or too high value) in the "Text file output" transform.
Problem II:
if the Text file output transform uses data from a previous text file input transform, its length-specifications depend on the original file the "Text input" transform used. And the lengths of the "Test input" transform depend on the actual lengths in the file that gets read.
If later the file or file content changes (yielding longer values), truncation in the "Text file output" transform happens. (As the length values remain unchanged.)
See also the various sidenotes and related issues that are placed in the notes of the pipeline.
How to reproduce:
exactly follow the instructions in the workflow and pipeline.
[Archive.zip](https://github.com/apache/hop/files/11002320/Archive.zip)
additional info:
@[Hans Van Akelyen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hansva) :
"Integers with a length get right padded leading to the spaces.": I observed the following behaviour, which is probably not perfectly intended:
in contrast to strings, where blanks are added to the right, for integers blanks are added to the left
for a three-digit integer, if the length is set to 3, an unnecessary blank is added to the left, making up four characters in total
if the length is set to a longer value than the number has digits, "0"s are added on the left, right after the blank
"The solution to all your problems is to keep the length field empty and/or turn on trimming on the fields."
In the integer case, what I observed was that turning on trimming on integer fields in the text file output step does not get rid of the blank.
### Issue Priority
Priority: 3
### Issue Component
Component: Documentation, Component: Transforms
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: Issues with "Text file output" transform (preceeding blanks; truncation) (hop)
Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva closed issue #2670: [Bug]: Issues with "Text file output" transform (preceeding blanks; truncation)
URL: https://github.com/apache/hop/issues/2670
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org