Hello,

I was trying to set up a pipeline that could uncompress a tar.gz archive,
and I noticed a strange behaviour of some components:

SETUP 1:
- ${LOCAL_PATH} and ${ARCHIVE_NAME} are variables where the local path and
the archive file name are set respectively
- use a Get file names transform to get the contents of the archive as file
names (use the syntax tgz:file://${LOCAL_PATH}/${ARCHIVE_NAME}!/ to access
that ones)
- link to a Token replacement to replace the fixed text
${LOCAL_PATH}/${short_filename} with the field short_filename in place of
token ${short_filename}
- link to a Process files and set it to copy file from the field filename
to the path generated by Token replacement

RESULT OF SETUP 1: the pipeline fails, because it tries to copy files in a
non-existing folder that contains "${LOCAL_PATH}" (not expanded variable)

SETUP 2:
- ${LOCAL_PATH} and ${ARCHIVE_NAME} variables, and Get file name transform,
setup like in Setup 1
- link to an Add constants, add a field local_path with value ${LOCAL_PATH}
- link to a Token replacement to replace the fixed text
${local_path}/${short_filename} using the fields local_path and
short_filename respectively
- link to a Process files and set it to copy file from the field filename
to the path generated by Token replacement

RESULT OF SETUP 2: the pipeline succeeds! However I added a Write to log
transform at the end and noticed that:
- the field local_path has value "${LOCAL_PATH}" (not expanded variable)
- the field generated by Token replacement has the correct file path to the
extracted files

Should this behaviour be filed as a bug in Hop?

DC

Reply via email to