Created 03-11-2024 08:53 AM
Hi, I'm new to Apache NiFi and really struggle to apply online previous answers for my question, the Idea is to fetch json from Apache Kafka using a ConsumeKafka processor, it fetches data correctly, now I want to take the attributes from the consumer and load them to a hive database. I tried EvaluationJsonPath to parse the json and log attributes separated, upon inspecting the queue the json appears as from the source and not attributes separated.
Notice how I don't include 'Price/Meter' attribute to test:
This is the queue after the EvaluateJsonPath processor (similar to the source):
Any help dealing with the json to hive situation would be appreciated, thanks.
Created 03-11-2024 11:07 AM
@ehehtenandayo You should be looking at nifi's record based processors.
NiFi includes the following RecordReader and RecordWriter Processors:
These processor use record reader and record writer, which can define or infer the schema of the json. Then, you are able to write a SQL statement for the results you want. Additionally this will help with taking those flowfiles of json and feeding them to a putHive processor.
Here is an older post that will help with some of the fundamentals:
Created 03-14-2024 04:03 PM
@ehehtenandayo Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.
Regards,
Diana Torres,