简体   繁体   English

Apache Nifi:我想将数据CSV导入Elasticsearch,而不使用apache nifi将其流式传输到其他处理器

[英]Apache Nifi : I want to ingest my Data CSV to Elasticsearch without streaming it to some other processor using apache nifi

I am trying to setup a simple process to modify my CSV file and ingest it to the elasticsearch DB using Apache Nifi. 我正在尝试建立一个简单的过程来修改我的CSV文件,并使用Apache Nifi将其提取到elasticsearch数据库中。 I don't want to stream my CSV file on Stdout, while passing my file from one processor to another. 在将文件从一个处理器传递到另一个处理器时,我不想在Stdout上流式传输CSV文件。

I've already made two flows. 我已经做了两个流程。

Myfirst flow get my CSV file using GetFile processor, customizes it using ExecuteStreamCommand in which i run my python script to read,modify and save my CSV file locally. Myfirst流使用GetFile处理器获取我的CSV文件,并使用ExecuteStreamCommand对其进行自定义,我在其中运行python脚本以在本地读取,修改和保存CSV文件。

My second flow again read that modified CSV file using GetFile processor and ingest it directly to my ElasticSearch DB. 我的第二个流程再次使用GetFile处理器读取了修改后的CSV文件,并将其直接摄取到我的ElasticSearch DB中。

Now, for getting this task accomplished, i run these two flows seperatly. 现在,为了完成此任务,我分别运行了这两个流程。

Can i connect the ExecuteStreamCommand of my first flow and GetFile of my second flow together, so that i can run them together as one single flow. 我可以将第一个流的ExecuteStreamCommand和第二个流的GetFile连接在一起,以便可以将它们作为一个单独的流一起运行。

Is there any other option to read a file written by ExecuteStreamCommand locally without streaming ?? 还有其他选择可以读取ExecuteStreamCommand本地写入的文件而不进行流传输吗?

The output of the command executed by ExecuteStreamCommand will be written to a flow file that is transferred to the "output stream" relationship. 由ExecuteStreamCommand执行的命令的输出将被写入流文件,该文件将转移到“输出流”关系。 You should be able to connect ExecuteStreamCommand "output stream" directly to PutElasticSearch. 您应该能够将ExecuteStreamCommand“输出流”直接连接到PutElasticSearch。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM