Created on 11-14-2016 07:36 PM - edited 08-18-2019 03:21 AM
Hi,
I have a case where i have to route incoming flow files to different folders based on the File names. Lets say i have 1000 files that need to send to 5 folders. i thought this would work with Advanced settings of updateattribute where i can write the rules.
but the folder name is not being populated.anything wrong i am doing .?? here my test flow..List-->Fetch-->UpdateAttribute-->PutFile
and i tried to use the Folder attribute in the putfile ..i tried without single quotes also..
or is there any better approach..?? i need to route 8000 files in to 18 different folders.basically 70 files to 17 folders and remaining 7100+ files to a default folder..(per day 8K files , i need to load data for 18 months)
Thanks for your help..
Regards,
Sai
Created 11-14-2016 08:04 PM
Sounds like your Conditional EL statements are not resulting in a boolean true in your UpdateAttribute processor. After some FlowFiles get routed through the UpdateAttribute let them queue on the outbound connection (Stop the next processor). Right click on the connection and select "List queue". Click on the "view details" icon to the far left of a FlowFile and look at the Attributes on that FlowFile. Do you see the expected "Folder" attribute? is it set to the correct value?
If it does not exist, does the filename match exactly one of the provided strings in your EL condition statements?
Thanks,
Matt
Created 11-14-2016 08:04 PM
Sounds like your Conditional EL statements are not resulting in a boolean true in your UpdateAttribute processor. After some FlowFiles get routed through the UpdateAttribute let them queue on the outbound connection (Stop the next processor). Right click on the connection and select "List queue". Click on the "view details" icon to the far left of a FlowFile and look at the Attributes on that FlowFile. Do you see the expected "Folder" attribute? is it set to the correct value?
If it does not exist, does the filename match exactly one of the provided strings in your EL condition statements?
Thanks,
Matt
Created 11-14-2016 08:06 PM
Also recommend against putting the quotes around your folder names ('MS1' should be just MS1).
Created 11-14-2016 09:06 PM
it is working..my file name format has changed. it has a "-" where its supposed to have a "_" i didn't notice it earlier.
thank you.
anyway is there a better approach to this.??
Regards,Sai
Created 11-14-2016 09:49 PM
I believe the process you have is spot on and keeps the number of processors to a minimum.
Matt