Support Questions

Find answers, ask questions, and share your expertise

Using UpdateAttribute Advanced Tab , property value not being populated.

avatar
Super Collaborator

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

9420-advanced.png

and i tried to use the Folder attribute in the putfile ..i tried without single quotes also..

9431-advanced2.png

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

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Saikrishna Tarapareddy

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

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Saikrishna Tarapareddy

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

avatar
Master Mentor

Also recommend against putting the quotes around your folder names ('MS1' should be just MS1).

avatar
Super Collaborator

@Matt

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

avatar
Master Mentor

I believe the process you have is spot on and keeps the number of processors to a minimum.

Matt