Forum Discussion
If you need to replace them for the target system, you can do that before the filtering using regex.
The following expression might not catch all of your scenarios but should be a good starting point:
$docname.map(x => x.replace(/(#|\/|\s){1,2}/g,'_'))
BR,
Aleksandar π
Thank you again for your help @AleksandarAngelevski .
Correct, there is no way to pass a variable βupβ. To elaborate on that a bit, the snaps all run in parallel, so there would be a race between the snap that is passing the variable βupβ and the snap that is trying to read the variable. For example, if there were two files coming in, the Write snap might see the first file name in one execution and the second file name in another execution.
- graham-onpoint7 years agoNew Contributor II
I can see how that would happen, but could that not be controlled with a ForEach Snap that serializes the processing?
The use case you are thinking of would require a child pipeline due to the race condition, however it is not a requirement for the pipeline I am developing as (a) there will only be one file, and (b) it is acceptable to stop processing and throw an error if there is more than one file.
Hmm, Iβm not quite sure what you mean here. The PipeExec snap basically obsoletes the ForEach snap.
Thatβs not going to be true in the general case. So, we canβt add something so error prone and hope that people only use it in the right situations.
Related Content
- 3 years ago
- 3 months ago
- 6 months ago