Created on 03-06-2017 08:22 PM - edited 08-19-2019 01:13 AM
I am attempting to use the UpdateAttribute processor to update the filename of my incoming files dynamically according to date. I am getting this error on the PutHDFS processor: Relative path in absolute URI: (then it has the code Im using to create the relative path). I have uploaded screenshots of both my UpdateAttribute and PutHDFS processors config page as well as a screenshot of the error
Created 03-07-2017 08:58 AM
The filename attribute set in the UpdateAttribute processor looks to have the wrong quote character, probably a backtick instead of a single quote.
You can tell by the colour of the trailing ')}'; The ')' is the rusty string colour instead of the control character black, and the '}' is bright red, indicating an error instead of the attribute grey.
Created 03-06-2017 08:56 PM
Can you verify that after the UpdateAttribute processor the "filename" attribute is set correctly?
You could do this by either sticking a LogAttribute processor between UpdateAttribute and PutHDFS, or by stopping PutHDFS and listing the queue before it, and looking at the attributes of one of the flow files.
I think that maybe the expression was somehow entered incorrectly in UpdateAttribute (possibly copied/pasted) because in the error message its showing your closing bracket as %7D. I would try going into UpdateAttribute and editing the filename property and deleting and retyping the closing bracket at the end of the expression to see what happens.
Created 03-06-2017 09:02 PM
Start troubleshooting your flow by stepping a FlowFile through one processor at a time. Try right clicking on the connections and select "list queue". Clicking the "details" icon to the far left of a FlowFile in the queue list to get details of that FlowFile in that connection. Does the filename look correct?
Thanks,
Matt
Created 03-07-2017 08:58 AM
The filename attribute set in the UpdateAttribute processor looks to have the wrong quote character, probably a backtick instead of a single quote.
You can tell by the colour of the trailing ')}'; The ')' is the rusty string colour instead of the control character black, and the '}' is bright red, indicating an error instead of the attribute grey.
Created 03-07-2017 04:21 PM
Great catch. I fixed the incorrect quote character but still getting the same error on PutHDFS
Created 03-07-2017 06:26 PM
I accepted this because your solution was in a comment down below, for future reference for others. Using the colon in the filename was the problem.
Created on 03-07-2017 04:42 PM - edited 08-19-2019 01:13 AM
Well, I have altered the text in the filename attribute so that there isn't any errors but still getting the same error in PutHDFS. It does look slightly different now (see screenshot) it is producing the correct filename when I look at the list queue and the output of the filename in the error (with the odd exception there is a dot before the first letter of the filename... not sure if thats the issue)
A consideration was possibly that the I was creating the directory structure dynamically in PutHDFS (see original screenshot) but I changed it to a non-dynamic directory specification and it still produced the same error.
Its interesting to me that the error is produced on the PutHDFS processor yet its complaining about the filename that is dynamically created in UpdateAttribute.
I have attached more screenshots. I appreciate any help.
Created 03-07-2017 05:07 PM
I haven't tested this recently, but I'm pretty sure that it won't like the ':' in the filename, and having spaces is bad practice generally. I suggest you use 'yyyy-MM-dd_HH-mm-ss'
Created 03-07-2017 06:25 PM
That was it! Thank you!