Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Relative path in absolute URI error

avatar
Expert Contributor

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

13296-screen-shot-2017-03-06-at-31850-pm.png

13298-screen-shot-2017-03-06-at-31912-pm.png

13299-screen-shot-2017-03-06-at-32142-pm.png

1 ACCEPTED SOLUTION

avatar

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.

View solution in original post

8 REPLIES 8

avatar
Master Guru

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.

avatar
Super Mentor
@Eric Lloyd

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

avatar

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.

avatar
Expert Contributor

Great catch. I fixed the incorrect quote character but still getting the same error on PutHDFS

avatar
Expert Contributor

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.

avatar
Expert Contributor

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.

13333-screen-shot-2017-03-07-at-112846-am.png

13334-screen-shot-2017-03-07-at-112904-am.png

13335-screen-shot-2017-03-07-at-113344-am.png

avatar

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'

avatar
Expert Contributor

That was it! Thank you!