在水壶中使用文本文件输入从 tar.gz 文件中读取 csv 文件,但它没有用。哪里可能错了?

In kettle use text file input read csv file from a tar.gz file but it didn't worked. Where it might be wrong?

我有一个去皮和压缩的 csv 文件。所以我有 test.tar.gz.
我想通过文本文件输入,读取csv文件。
我试试这个 tar:gz:file://C:/test/test.tar.gz!/test.tar! 使用像 ".*\.csv".
这样的通配符 但是有时候读不到成功。
它抛出异常

 org.apache.commons.vfs.FileNotFolderException: 
 Could not list the contents of 
 "tar:gz:file:///C:/test/test.tar.gz!/test.tar!/" 
  because it is not a folder.

我用windows8.1, pdi 5.2
哪里可能错了?

对于压缩文件csv读取,Pentaho Kettle中的"Text File Input"步骤仅支持压缩文件夹中的第一个文件(在Zip/GZip文件中)。检查压缩部分中的Pentaho Wiki

现在针对您的问题,请尝试删除通配符条目,因为只会读取 zip/gzip 文件中的第一个文件。 (如上所述)

我已经放置了包含阅读 zip 和 gzip 文件的示例代码。检查一下 here.

希望对您有所帮助:)