Member since
09-22-2021
7
Posts
1
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
794 | 12-03-2021 05:29 AM | |
791 | 09-23-2021 12:10 AM |
01-18-2022
05:57 AM
You can do this by using ExecuteStreamCommand processor. In that processor you will give a python script path. While in script you can get this data, perform your desired operation and let the data out. Link to documentation is https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.apache.nifi.processors.standard.ExecuteStreamCommand/index.html
... View more
12-03-2021
05:29 AM
Solution is to use ExecuteStreamCommand option. The reason is ExecuteScript in nifi is not pure python instead it's jython. So, to execute a python code, we only need to set the python path and the file path. The configuration for this can be seen from the image attached below.
... View more
11-28-2021
10:30 PM
I am trying to get the data from elasticsearch from processor group via port. I want to apply some python code on the output data. How can I read the input and execute the code?
... View more
Labels:
- Labels:
-
Apache NiFi
10-07-2021
04:47 AM
This can be done with nipyapi, a python library. Check the documentation Nipyapi
... View more
10-06-2021
05:46 AM
This can be done with CRON if option is available, otherwise you can automate the process using python and nipyapi.
... View more
09-23-2021
12:10 AM
1 Kudo
Solved: So, basically the problem was from Ubuntu side. The directory was under root privilege. Following command helped: "sudo chmod a+rwx --path to directory--"
... View more
09-22-2021
07:29 AM
Hi. I am trying to write a text file from execute script with python. Whenever the processor executes, it creates a locked text file. How can I overcome this problem? Following is the code from time import gmtime, strftime import datetime now = datetime.datetime.now() current_time = now.strftime("%H:%M:%S") with open('**path to directory**/time.txt', "a") as f: current_time = str(current_time) + ('\n') f.write(current_time) f.close()
... View more
Labels:
- Labels:
-
Apache NiFi