Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

NiFi design to include REST auth in SQL to JSON to HTTP POST

avatar
New Contributor

Hi All.

 

I'm relatively new to NiFi and would like a little help in designing a data flow that looks like this:

 

  1. SELECT from a SQL data source
  2. split/convert to JSON
  3. optionally transform JSON
  4. merge to 500 record batches
  5. POST to target via REST API (requires session token from API auth POST)

I know how to create this flow in NiFi. The part I'm having trouble with is including a step that gets a session token via the REST API auth endpoint. I can get the session token using InvokeHTTP no problem. I just don't know how to add the session token to the flow file(s) containing the data to POST to the API.

 

Thanks for your help.

1 ACCEPTED SOLUTION

avatar
Super Guru

Hi, @abhai ,

 

Please check my response to this question. It may also address yours.

 

Regards,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

2 REPLIES 2

avatar
Super Guru

Hi, @abhai ,

 

Please check my response to this question. It may also address yours.

 

Regards,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
New Contributor

Hi @araujo ,

 

This is exactly what I was looking for. Thanks very much!