Posts

Showing posts from 2020

dotifi: Generating DOT files from the Apache Nifi canvas

Image
Something I really enjoy is when someone who is using one of the open source projects that I contribute to  has a cool idea or need that inspires me.  Sometimes people have needs or ideas and I may think, well that would be cool, but I have no idea how you would do that.  But other times, they get you thinking and you do have some idea, and that can lead to some fun things. This happened recently with a thread on the Apache NiFi Slack, where someone posed a simple question: That is pretty interesting.  How to document a Nifi flow? That really got me thinking, and brought something to mind.   https://diagrams.mingrammer.com . Diagrams lets you generate pretty stylish diagrams in python code.  I had recently discovered it and used it for a couple of diagrams to use in a presentation and liked it a lot. Along with  NiPyApi , the idea would be to traverse a NiFi Canvas and generate a diagram from that. That is a pretty cool idea, and diagrams is definitely pretty neat.. but diagrams is not

Sending Multipart / Form Data with InvokeHTTP in Apache NiFi 1.12

Image
Apache NiFi InvokeHTTP processor is described as: An HTTP client processor which can interact with a configurable HTTP Endpoint. The destination URL and HTTP Method are configurable. FlowFile attributes are converted to HTTP headers and the FlowFile contents are included as the body of the request (if the HTTP Method is PUT, POST or PATCH). Before today, it did not support the POST method with multipart/form data. But with the landing of a pull request  today, it does.  This feature is now on master, and should be available in the next release (1.12). You can now send: Just form data ( name / value pairs ) Form data and the FlowFile content ( optionally setting the file name attribute ) Just the FlowFile content Since NiFi has processors to handle multipart/form data requests already, we'll be able to test it out completely in NiFi. Our simple flow * it is assumed that the reader is familiar with Apache Nifi enough to add processors and configure connect