连续将本地文件与从S3下载的文件组合在一起(Continuously Combining local file with files downloaded from S3)

编程入门 行业动态 更新时间:2024-10-25 02:21:27
连续将本地文件与从S3下载的文件组合在一起(Continuously Combining local file with files downloaded from S3)

我有一个NIFI流,我从S3获取文件。 一对文件通过S3获取,然后传递到MergeContent处理器。 接下来,有一个README文件需要与每对文件一起使用。

这个README文件总是相同的,我已经将它存储在本地。 我有一个从MergeContent处理器接收内容的ExecuteStreamCommand 。

我已经尝试使用ListFile / FetchFile组合将README文件传入MergeContent处理器,但未按预期工作。 我猜我最终的结果是一个MergeContent包,它包含从S3 + README文件下载的一对文件。

I have a Nifi flow where I am fetching files from S3. A pair of files are fetched through S3 and later passed into a MergeContent processor. Next, there is a README file that needs to go with each pair of files.

This README file is always same and I have stored it locally. I have a ExecuteStreamCommand that takes in content from the MergeContent processor.

I have tried passing in the README file into the MergeContent processor using the ListFile/FetchFile combination but its not working as expected. I guess the final result that I am looking for is a MergeContent package that contains a pair of files downloaded from S3 + the README file.

最满意答案

我认为在这种情况下,您会希望为README使用GetFile - 路径是静态的,您可以将Keep Source File设置为true ,以便不断检索相同的内容。

ListFile / FetchFile可能不起作用,因为一旦ListFile从目录中检索到文件名,它就会将时间戳存储在本地状态中,并且不会检索比下一次执行时更早的文件。

I think in this case you will want to use GetFile for the README -- the path is static, and you can set the Keep Source File setting to true in order to constantly retrieve the same content.

ListFile/FetchFile probably isn't working because once ListFile retrieves a filename from the directory, it stores the timestamp in its local state and won't retrieve files older than that on the next execution.

更多推荐

本文发布于:2023-08-02 02:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1368432.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:组合   本地文件   文件   Continuously   downloaded

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!