Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

nifi splitjson array to HBASE row

Highlighted

nifi splitjson array to HBASE row

New Contributor

i'm having json array as

{"weather": [ {"id":"1","latitude":"13.08","longitude":"80.27","temprature":"39","pressure":"1009mb","visibility":"7km","wind":"4mph","cloudcover":"50%","momentmagnitude":"9.1"}, {"id":"2","latitude":"14.08","longitude":"80.27","temprature":"39","pressure":"1009mb","visibility":"7km","wind":"4mph","cloudcover":"50%","momentmagnitude":"9.1"}, {"id":"3","latitude":"15.08","longitude":"80.27","temprature":"39","pressure":"1009mb","visibility":"7km","wind":"4mph","cloudcover":"50%","momentmagnitude":"9.1"}, {"id":"4","latitude":"16.08","longitude":"80.27","temprature":"39","pressure":"1009mb","visibility":"7km","wind":"4mph","cloudcover":"50%","momentmagnitude":"9.1"}, {"id":"5","latitude":"17.08","longitude":"80.27","temprature":"39","pressure":"1009mb","visibility":"7km","wind":"4mph","cloudcover":"50%","momentmagnitude":"9.1"} ] }

i'am trying to insert the same to hbase,

Problem :- only the last row is getting inserted.

how to get the each array into hbase row

2 REPLIES 2

Re: nifi splitjson array to HBASE row

Contributor

@Subramaniyam KMV, could you please update your question and include the actual code you are running, so that we can reproduce the problem? Once we have steps to reproduce, it will be much more easier to fix

Re: nifi splitjson array to HBASE row

New Contributor

@pbarna

Please refer the attchment. ---> mqtt-hbase.png

Step 1) ConsumeMQTT using mosquitto

Step 2) UpdateAttributes

Step 3) EvaluateJsonPath

Step 4) SplitJson - will produce the separate flowfile for each JSON array

Step 5) PutHbaseJSON --> Store the Json Array to HBASE

Hope you can now simulate the same

Don't have an account?
Coming from Hortonworks? Activate your account here