GitHub user lionants02 edited a comment on the discussion: I want to write/read 
multiple files simultaneously with Specify copies

In the "Serialize To File" sequence, "${Internal.Transform.CopyNr}" can be 
used, but when I try to read back with "De-Serialized From File", the same 
value cannot be used. Can anyone give me some advice? 😵‍💫😵‍💫😵‍💫
Ref: https://hop.apache.org/manual/latest/variables.html#_internal_variables
Example pipeline: 
https://github.com/lionants02/test-bug-hop/tree/main/1-createfile-readfile
Note line error: 
https://github.com/apache/hop/blob/d6fabdb18fb2a38f1fea07f9e41e7900e05ec17a/plugins/transforms/cubeinput/src/main/java/org/apache/hop/pipeline/transforms/cubeinput/CubeInputMeta.java#L102

<details>
  <summary>Error Log</summary>

```log
2025/07/11 13:13:17 - Hop - Pipeline opened.
2025/07/11 13:13:17 - Hop - Launching pipeline [0_user_lookup_uk]...
2025/07/11 13:13:17 - Hop - Started the pipeline execution.
2025/07/11 13:13:17 - Hop - ERROR: 0_user_lookup_uk: preparing pipeline 
execution failed
2025/07/11 13:13:17 - Hop - ERROR: 
org.apache.hop.core.exception.HopTransformException: 
2025/07/11 13:13:17 - Hop - Unable to read metadata from cube file
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop - org.apache.commons.vfs2.FileNotFoundException: 
Could not read from 
"file:///B:/temp/private-dashboard/source/users_${Internal.Transform.CopyNr}" 
because it is not a file.
2025/07/11 13:13:17 - Hop - Could not read from 
"file:///B:/temp/private-dashboard/source/users_${Internal.Transform.CopyNr}" 
because it is not a file.
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop - Could not read from 
"file:///B:/temp/private-dashboard/source/users_${Internal.Transform.CopyNr}" 
because it is not a file.
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.transforms.cubeinput.CubeInputMeta.getFields(CubeInputMeta.java:113)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.transform.BaseTransformMeta.getFields(BaseTransformMeta.java:328)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.PipelineMeta.getThisTransformFields(PipelineMeta.java:1414)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.PipelineMeta.getTransformFields(PipelineMeta.java:1222)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.PipelineMeta.getTransformFields(PipelineMeta.java:1116)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.PipelineMeta.getTransformFields(PipelineMeta.java:1082)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.engines.local.LocalPipelineEngine.addTransformExecutionSamplers(LocalPipelineEngine.java:323)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.engines.local.LocalPipelineEngine.prepareExecution(LocalPipelineEngine.java:242)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.ui.hopgui.file.pipeline.HopGuiPipelineGraph.lambda$preparePipeline$16(HopGuiPipelineGraph.java:4497)
2025/07/11 13:13:17 - Hop -     at 
java.base/java.lang.Thread.run(Thread.java:833)
2025/07/11 13:13:17 - Hop - Caused by: 
org.apache.hop.core.exception.HopFileException: 
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop - org.apache.commons.vfs2.FileNotFoundException: 
Could not read from 
"file:///B:/temp/private-dashboard/source/users_${Internal.Transform.CopyNr}" 
because it is not a file.
2025/07/11 13:13:17 - Hop - Could not read from 
"file:///B:/temp/private-dashboard/source/users_${Internal.Transform.CopyNr}" 
because it is not a file.
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop - Could not read from 
"file:///B:/temp/private-dashboard/source/users_${Internal.Transform.CopyNr}" 
because it is not a file.
2025/07/11 13:13:17 - Hop - 
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.core.vfs.HopVfs.getInputStream(HopVfs.java:390)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.pipeline.transforms.cubeinput.CubeInputMeta.getFields(CubeInputMeta.java:102)
2025/07/11 13:13:17 - Hop -     ... 9 more
2025/07/11 13:13:17 - Hop - Caused by: 
org.apache.commons.vfs2.FileNotFoundException: Could not read from 
"file:///B:/temp/private-dashboard/source/users_${Internal.Transform.CopyNr}" 
because it is not a file.
2025/07/11 13:13:17 - Hop -     at 
org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1202)
2025/07/11 13:13:17 - Hop -     at 
org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1187)
2025/07/11 13:13:17 - Hop -     at 
org.apache.commons.vfs2.provider.DefaultFileContent.buildInputStream(DefaultFileContent.java:257)
2025/07/11 13:13:17 - Hop -     at 
org.apache.commons.vfs2.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:525)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.core.vfs.HopVfs.getInputStream(HopVfs.java:381)
2025/07/11 13:13:17 - Hop -     at 
org.apache.hop.core.vfs.HopVfs.getInputStream(HopVfs.java:388)
2025/07/11 13:13:17 - Hop -     ... 10 more
2025/07/11 13:13:17 - Hop - Caused by: java.io.FileNotFoundException: 
B:\temp\amed_care\private-dashboard\source\users_${Internal.Transform.CopyNr} 
(The system cannot find the file specified)
2025/07/11 13:13:17 - Hop -     at 
java.base/java.io.FileInputStream.open0(Native Method)
2025/07/11 13:13:17 - Hop -     at 
java.base/java.io.FileInputStream.open(FileInputStream.java:216)
2025/07/11 13:13:17 - Hop -     at 
java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
2025/07/11 13:13:17 - Hop -     at 
org.apache.commons.vfs2.provider.local.LocalFile.doGetInputStream(LocalFile.java:105)
2025/07/11 13:13:17 - Hop -     at 
org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1200)
2025/07/11 13:13:17 - Hop -     ... 15 more
```
</details>

<img width="1834" height="833" alt="image" 
src="https://github.com/user-attachments/assets/c4352de1-7fca-4c0d-9379-3e9293d8939e";
 />
<img width="1171" height="807" alt="image" 
src="https://github.com/user-attachments/assets/89d9b6de-41ee-4d9c-abdc-4cb768ac8f7b";
 />


GitHub link: 
https://github.com/apache/hop/discussions/5499#discussioncomment-13727431

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@hop.apache.org

Reply via email to