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!

Put array with Dates on nifi flowfile

avatar

Hi! I have an array with dates and I want to insert it into my flowFile through a groovy script but I can't find a way to do it, could you help me?

SamuelRisso_0-1626364782687.png

that's my script with which I get dates.

SamuelRisso_1-1626364916519.png

and this is my groovy script but it always goes to the queue of failure.



1 ACCEPTED SOLUTION

avatar

I am not entirely sure what you are trying to achieve.

If the set of data lives somewhere in a file you should be able to read it (e.g. list and fetchfile).

 

If the data is generated by a script, is that just for testing?

 

You could look at executescript or ExecuteGroovyScript, or perhaps just generate fake data directly with GenerateFlowFile (though the exact variety that you mention would be tough with the latter)


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

View solution in original post

1 REPLY 1

avatar

I am not entirely sure what you are trying to achieve.

If the set of data lives somewhere in a file you should be able to read it (e.g. list and fetchfile).

 

If the data is generated by a script, is that just for testing?

 

You could look at executescript or ExecuteGroovyScript, or perhaps just generate fake data directly with GenerateFlowFile (though the exact variety that you mention would be tough with the latter)


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.