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]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

IS THERE A PROCESSOR IN NIFI THAT CAN CREATE MANY DIRECTORY IN HDFS

avatar

Hello everyone, I've start working with nifi last week so sorry if my question is an obvious one.

I'm currentlty taking data in a Kafka Topic, those data are in Json format. I'm scaning every Json document and depending of the value of some fields, i would like to sort them in a directory with the name of the value.

for example if i have :

{"timestamp_da":"2016-07-06T15:04:33.332+00:00","type":"question","subject":"nifi"}

{"timestamp_da":"2016-07-06T15:04:33.332+00:00","type":"question","subject":"Kafka"}

==> I would like to extract the timestamp value and convert it into "20160706" and then create a directory with it.

After that every Json with the same timestamp will be route there. Is it possible ? or I'm I dreaming ?

I initially was doing this with spark but i think it's a waste to use spark just for this. If my question wasn't clear enought i can give more details.

Thanks in advance

1 ACCEPTED SOLUTION
2 REPLIES 2

avatar

Thank you very much for your Help sir and have a good day or night depend on where you are 🙂