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版本,可能是一項新功能。 –