You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "gmitter-ef (via GitHub)" <gi...@apache.org> on 2025/11/06 07:38:23 UTC

[I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

gmitter-ef opened a new issue, #5958:
URL: https://github.com/apache/hop/issues/5958

   ### Apache Hop version?
   
   2.15
   
   ### Java version?
   
   OpenJDK 17
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   A booleans value is read from a JSON file via JSON input transform.
   A 'true'/'false' string is read from a database.
   Both fields are converted to "Boolean" via "Select values" transform in the same way.
   Still the "Write to log" transform displays them differently.
   
   
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui, 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]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-3501150394

   The table input uses the information that is coming back from the table itself, so if it is a varchar(200), the length will be 200. And it is not persisted for those types of transforms. On text file inputs and outputs the lenghts do matter. Usually those transforms have a "minimal widht" option which will just clear the lenght. I suggest leaving the length empty in most cases as it has little value unless you are working in fixed width situations
   


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "mattcasters (via GitHub)" <gi...@apache.org>.
mattcasters closed issue #5958: [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log
URL: https://github.com/apache/hop/issues/5958


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "gmitter-ef (via GitHub)" <gi...@apache.org>.
gmitter-ef commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-3496313714

   @hansva 
   Thanks a lot for your comments!
   
   Especially the distinction between "Hop data type"  and "Java data type": is there anything "official" and more detailed in the docs about this? Are there any important implications / things to consider when developing pipelines?
   
   Apart from that, regarding the inital problem:
   casting/changing as little as possible is of course perfectly reasonable.
   But it was quite a tough time finding out that the different lengths (that were never set explictly!) were the reason for the different output in the Write to log. Furthermore I found no format available to get Boolean type fields printed out the same way.
   Is there some format mask for Booleans available? Would it make sense to offer one? Could the problem be solved also differently than by setting identical length values?
   


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-3496130796

   We make a distinction between the "Hop data type" and the actual underlying java data type. This saves us from having to cast Java types.
   Eg a Hop Boolean type can be a Java String,Integer,Boolean we don't automatically convert them. A write to log transform will just call the .toString of the underlying object no need to fist change the actual type and then print the information. On output transform (eg table output) we will change it to the actual type needed to do the correct insert


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-3496384665

   The only bit of documentation we have which only covers the ideal mappings we do is [here](https://hop.apache.org/manual/next/snippets/hop-concepts/data-types.html) so this should get expanded containing all possible types and mappings.
   
   I also think it would make sense to add formatting options to the Boolean type which could help when writing to text files. Because I'm not sure the different Boolean ways you have now would get harmonized in a text file output. I would have to check the code and work out some samples for that


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "gmitter-ef (via GitHub)" <gi...@apache.org>.
gmitter-ef commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-3500995743

   @hansva 
   
   
   > The only bit of documentation we have which only covers the ideal mappings we do is [here](https://hop.apache.org/manual/next/snippets/hop-concepts/data-types.html) 
   
   Thank you
   
   > I also think it would make sense to add formatting options to the Boolean type which could help when writing to text files. 
   
   Great!
   
   I still have a question regarding the automatic length-settings done by Hop in the Table input step (here: 4): are they inferred by the maximum value encountered in the query result of table? Could we ever run into problems regarding truncation in case longer values appear in a newly-configured source database / table? I think we encountered problems in combination with text file output step at least in PDI.
   
   
   


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-3496086420

   This is not a bug, what we do to reduce overhead is try to avoid casting/changing data as much as possible. Because each change requires significant CPU overhead which would slow the pipeline down. Only when an action is done that actually forces us to have to change the data we will do it. And in the case of Hop 1/0, Y/N, true/false (both string and actual Boolean Java types) are all considered as valid Booleans


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-5795805973

   .take-issue


-- 
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


Re: [I] [Bug]: depending on the source, even after converting fields to Booleans they are displayed differently in Write to log (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
hansva commented on issue #5958:
URL: https://github.com/apache/hop/issues/5958#issuecomment-5796217350

   The documentation has been updated and I have also added format mask support to the boolean type.
   This way you can specify what the output string of True/False needs to be when writing to a textfile for example.


-- 
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