Support Questions
Find answers, ask questions, and share your expertise

How to send data as a webservice with nifi?

Explorer

Hey,

I'm new to NiFi and know how to store data in Kafka, HBase and HDFS. I'm also have a simple webservice which sends only statuscodes. Now I want to send data from HBase (using Hive) as a webservice but I don't know how to add the data to the response depending on the httprequest.

I can only find data ingestion examples, but nothing for my topic. Maybe I'm using the wrong search terms. It would be great if you can share a nifi template or something else to help me to solve this usecase.

Thanks in advance and best regards

Jan

2 REPLIES 2

Re: How to send data as a webservice with nifi?

Guru

If you use HandleHTTPResponse to send the response, the body of the response will be the content of the FlowFile sent into it. So if you are pulling data out of HBase for example with GetHBase, you should be able to pass the resulting FlowFile directly into HandleHTTPResponse and get that as the content of the response.

Re: How to send data as a webservice with nifi?

Explorer

@Simon Elliston Ball Thank you very much for the help.

I will try this, but just for my understanding: I can directly connect the GetHBase with HandleHTTPResponse without MergeContent or something else? Would it also work with GetKafka?