0
我正在寻找一种方法来创建Talend DI的文件夹结构(使用Talend Studio 5.2.0)。用Talend创建整个目录结构DI
我有一个临时文件夹中包含这样的事情:
/tmp/myjob/type1/file01.txt
/tmp/myjob/type1/file02.txt
/tmp/myjob/type1/file03.txt
/tmp/myjob/type1/fileN.txt
/tmp/myjob/type2/file01.csv
/tmp/myjob/type2/file02.csv
/tmp/myjob/type2/file03.csv
/tmp/myjob/type2/fileN.csv
/tmp/myjob/type3/file01.jpg
/tmp/myjob/type3/file02.jpg
/tmp/myjob/type3/file03.jpg
/tmp/myjob/type3/fileN.jpg
我想将整个目录结构传输到远程FTP(FTPS)文件夹中。
而结果将是:
/destination/type1/file01.txt
/destination/type1/file02.txt
/destination/type1/file03.txt
/destination/type1/fileN.txt
/destination/type2/file01.csv
/destination/type2/file02.csv
/destination/type2/file03.csv
/destination/type2/fileN.csv
/destination/type3/file01.jpg
/destination/type3/file02.jpg
/destination/type3/file03.jpg
/destination/type3/fileN.jpg
的想法是为了取/tmp/myjob
作为根源文件夹和拓蓝分量来重新创建整个目录结构在destination
配置tFTPPut
(远程)夹。
我试图把下面的线路中的filemask
属性:
FileMask newName
"./type1/*.txt" ""
"./type1/*.csv" ""
"./type1/*.jpg" ""
当我执行任务,它使以下错误:
[statistics] connected
Exception in component tFTPPut_1
2: No such file
任何人都知道,如果它可以创建这样的任务?
感谢您的建议,最后我做了之前的ssh命令来创建文件夹结构和另一个之后将上传的文件移动到正确的目录。对于perl正则表达式语法,我使用它,但我找不到在perl正则表达式和其他tFtpPut组件之间切换的方式。 –
您应该在“文件”表格上方看到一个标记为“使用Perl5正则表达式作为文件掩码”的复选框。这就是魔术。 –
tFTPPut组件中没有这样的框。但我正在使用Talend Studio 5.2.0版本,可能是一项新功能。 –