在Pentaho-spoon中使用多个通配符作为子目录路径



我试图使用GetFiles步骤来检索所有类型为.xlsx、文件名中有工作表、子目录路径中有公用名称的文件。

示例目录内容:

c:DATAa1 infoa1 z informationa1 boxa1 b2 NEWa1 sheet.xlsx
c:DATAa1 infoa2 zx informationa2 boxa2 b2 NEWa2 sheet.xlsx
c:DATAa1 infoa3 zy informationa3 boxa3 b2 NEWa3 sheet.xlsx
c:DATAa1 taska1 z taska1 boxa1 b2 newsheet.xlsx
c:DATAa1 taska1 z taska1 boxa1 b2 newsheet.xlsx

我只想要具有以下约束的文件名:

Home directory is c:DATA
The first subdirectory having info in the name.
The second subdirectory having information in the name
The third subdirectory having box in the name
The fourth subdirectory having NEW

我试过

File/Directory  Wildcard (RegExp)   Exclude wildcard               Required Include subfolders
C:DATA        .*.info.*.information.*.box.*.NEW.*.sheet.*.xlsx            N       Y
C:DATA        .+info.*.information.*.box.*.NEW.*.sheet.*.xlsx             N       Y
C:DATA        .*info.*information.*box.*NEW.*sheet.*.xlsx             N       Y

我不知所措。提前谢谢。

使用上一步的数据,您应该发送带有这些参数的输入数据,在每一行中设置目录和扩展名:

示例

CREATE TABLE test(
diretory TEXT,
exten CHARACTER VARYING(15)
)
INSERT INTO testdir
(diretory, exten)
VALUES ('C:Users...Documentsrevision','.*.(xlsx|XLSZ)'),
('C:Users...Downloads...','.*.(xls|XLS)'),
('D:...OrigenETA','.*.(txt|TXT)');

像这样的转变:

转换

配置步骤:

配置

结果:

结果

我认为这对你有效

最新更新