Adalennis opened a new issue, #9486:
URL: https://github.com/apache/hop/issues/9486

   ### Apache Hop version?
   
   2.20.0
   
   ### Java version?
   
   Java 21
   
   ### Operating system
   
   macOS
   
   ### What happened?
   
   Reproduced on 2.20.0; the samples are unchanged on main.
   
   Found while adding Samples sections to the transform pages (#9469). Each 
sample was run with `hop-run.sh -j samples -f 
'${PROJECT_HOME}/transforms/<sample>.hpl' -r local`.
   
   1. `transforms/binary-file-output.hpl` writes nothing.
      The only hop is *get filenames* → *load binary file*. *binary file 
output* has no incoming hop, so the run ends with exit code 0 and 
`output/binary-file-output.bin` is not created.
      Fix: add the hop *load binary file* → *binary file output*.
   
   2. `transforms/add-a-checksum-CRC32.hpl` uses SHA-512.
      Its Add a checksum transform has `<checksumtype>SHA-512</checksumtype>`, 
the same as `add-a-checksum-SHA-512.hpl`, and its note reads "Add Checksum -- 
CR - 232 Algorithm". It has been like this since the sample was added 
(HOP-2391).
      Fix: set the type to CRC32 and the note to "Add Checksum -- CRC32 
Algorithm".
   
   3. `transforms/call-db-procedure.hpl` always fails as shipped:
      `Function "ADDCOUNT" not found; SQL statement: ? = call addCount ( ?)`
      `addCount` is the PostgreSQL function that 
`integration-tests/database/0023-db-procedure.hwf` creates. `hop-samples` is an 
in-memory H2 database without it. The note says to set the procedure name 
first, but the filled-in name makes the sample look ready to run.
      Possible fixes: leave the procedure name empty, as the AWS and Azure 
samples leave their settings empty, or create a function in the H2 database 
before the call.
   
   4. `transforms/add-value-fields-changing-sequence.hpl` depends on the locale.
      The Calculator constant `ten` is `10.0` with type Integer. With 
`-Duser.language=en -Duser.country=US`, `change_counter` restarts at 1 every 10 
rows, as the note says. In a locale where `.` is the grouping separator 
(`en_BE`, `de_DE`, …), `10.0` becomes 100, so `divider` is 0 for rows 1–99 and 
`change_counter` only restarts at row 100.
      Fix: use `10` as the constant value.
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Samples


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to