bug: fixed file path for etl process .hwf file inside hop_oparl container

I just tried to get the Docker Compose setup running (worked) and then start the ETL script as documented in the Readme.md (did not work).

Reprex:

docker compose up -d
docker exec -it hop_oparl /data/oparl/script/main_load_Daily.sh

Results in the error (shortened)

Executing the following command:
/opt/hop/hop-run.sh --project=OParl -f=main_load_daily.hwf -e=oparl -r=local --logfile=/log/oparl//main_load_Daily-20241119.log
Log location: /log/oparl//main_load_Daily-20241119.log
2024/11/19 17:52:19 - HopRun - Referencing environment 'oparl' for project OParl' in Apache Hop docker container
2024/11/19 17:52:19 - HopRun - Enabling project 'OParl'
Error found during execution!
picocli.CommandLine$ExecutionException: There was an error during execution of file 'main_load_daily.hwf'
        at org.apache.hop.run.HopRun.run(HopRun.java:212)
        at org.apache.hop.run.HopRun.main(HopRun.java:930)
Caused by: picocli.CommandLine$ExecutionException: There was an error during execution of workflow 'main_load_daily.hwf'
        at org.apache.hop.run.HopRun.runWorkflow(HopRun.java:392)
        at org.apache.hop.run.HopRun.run(HopRun.java:206)
        ... 1 more
Caused by: org.apache.hop.core.exception.HopXmlException: 
Unable to load the workflow from XML file [main_load_daily.hwf]

Unable to read file [file:///opt/hop/main_load_daily.hwf]
Could not read from "file:///opt/hop/main_load_daily.hwf" because it is not a file.

The error always referred to main_load_daily.hwf not existing.

After poking around in the running oparl container with I think I found the solution. Line 10 in script/main_load_Daily.sh refers to a file that does not exist in the container. It seems to be actually at: /data/oparl/etl/main_load_Daily.hwf (so an error in both folder path and capitalization in the filename). After modifying the script to point to this location, the ETL process now runs.

Important for the review here: I do not know anything about hop and .hwf files, but at least now the script runs.

Edited by Mario Angst

Merge request reports

Loading