如何根据日期戳自动检索文件

发布于 2024-11-19 19:41:14 字数 183 浏览 2 评论 0原文

我对 pentaho 套件及其自动化功能很陌生。我每天都会收到文件,需要放置两列。我已经弄清楚如何添加列,但现在我陷入了自动化方面。文件名是不变的,但末尾有一个日期戳。例如:LEAVER_REPORT_NEW_20110623.csv。该文件将始终位于同一目录中。我该如何使用 Pentaho 数据集成来解决这个问题?我尝试获取文件,但这似乎不起作用。

Im new to the pentaho suite and its automation functionality. i have files that come in on a daily basis and two columns need to be put in place. I have figured out how to add the columns but now i am stuck on the automation side of things. The filename is constant but it has a datestamp at the end. EG: LEAVER_REPORT_NEW_20110623.csv. The file will always be in the same directory. How do i go about using Pentaho data integration to solve this issue? ive tried get files but that doesnt seem to work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帝王念 2024-11-26 19:41:14

在先前的转换中创建一个包含 20110623 的变量(通过获取系统信息步骤轻松获取日期,然后选择值步骤将格式设置为字符串,然后设置变量步骤),

然后更改要使用的文本文件输入的文件名:

LEAVER_REPORT_NEW_${变量名}.csv

create a variable in a previous transform which contains 20110623 (easy with a get system info step to get the date, and then a select values step to format to string, then a set variables step)

then change the filename of the textfile input to use:

LEAVER_REPORT_NEW_${variablename}.csv

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文