Created 03-23-2017 07:27 AM
Created 03-23-2017 07:32 AM
Hi @Rajkumar G,
Why are you trying to do that?
There is no relation between NiFi and Oozie and they don't have the same purposes. There is clearly no way to use a NiFi XML template with Oozie. NiFi is used to move data from point A to point B while doing routing, filtering, data enrichment, etc on the fly in a streaming fashion. Oozie is a task scheduler designed to schedule a set of tasks on a Hadoop cluster. Even though there is the notion of "template" in the two components, there is no relation between the two.
Hope this helps.
Created 03-23-2017 07:43 AM
Thank you for your response@Pierre Villard.I am using the nifi to poll from an ftp and ingest into s3 for this I need a scheduler kind of automation process to start the nifi say, to start polling in this time or start polling only this type of file arrives. Is there any way I could do it in nifi or using oozie?
Created 03-23-2017 08:00 AM
Why don't you poll the FTP using the crontab scheduling of the processor? You can use ListFTP processor that will give you the list of files on your FTP (only the new files since the last time processor has been executed), then you can do some filtering based on the attributes of the generated flow files (that should allow you to get only specific types of files), then you use the FetchFTP to actually retrieve the files you want from the FTP server and then you send the data in S3. You shouldn't need Oozie to do that or I'm missing your point.
If Oozie is really the way you want to do it, then your best shot is to use the REST API  of NiFi and then use the endpoints to start/stop the processor at the beginning of your flow. This way you can do a shell script that would be executed by a shell action in an Oozie workflow (but it sounds like an overkill to me).
Created 03-23-2017 09:35 AM
Thank you @Pierre Villard. I have one more doubt. I have exported my nifi workflow into .XML file in the dev environment. Now I move this .xml to SIT or UAT environment. How do I start this .Xml nifi flow in that environment. Is there any command used to start this .xml workflow like shell script. If yes, provide the steps please.
Created 03-23-2017 10:19 AM
Please refer to the documentation regarding how to use templates to export/import workflows between environments:
Created 03-23-2017 11:50 AM
Thanks for your continuous support. My question is simple I just want to start a workflow of NIFI in a command line interface like(linux machine). I dont want to use the GUI to start the workflow. How could I do it. Your help is much appreciated. Thanks in advance.
Created 03-23-2017 06:53 PM
You can use curl to make a REST API call to your NiFi instance to start the workflow. This does not require opening the UI and can be scripted/automated. You can also use MiNiFi as a headless (no UI) solution.
Created 03-23-2017 01:10 PM
The flow.xml.gz file or template.xml files produced by NiFi are not executable and do not include the actual java class in them needed to run the NiFi components within that xml. These files must be loaded into a NiFi installation in order to run them.
Why are you trying to run them outside of NiFi?
Created 03-24-2017 09:27 AM
How to pass a parameter using rest API through curl command for a particular process. Let say for example how to pass a parameter variable to the remotepathfile field of the LISTFTP process? . Thanks in advance.
Created 03-24-2017 11:37 AM
Simplest way to learn how to use curl to perform actions against your NiFi's rest-api is to read the REST-API docs included in the developer section under HELP and use the "developer tools" --> "network" in your browser to observe the commands in action as you initiate them via the UI. You can even write click on one and select copy as curl.