Skip to main content
guha
Silver ⭐️
May 4, 2017 11:18 PM UTC
Solved

Parsing Embedded Paths from the NiFi filename Attribute Using Expression Language

NULL

MattWho
MattWhoAnswer
Titanium ⭐️⭐️
May 4, 2017 11:29 PM UTC
@Prabir Guha

You would certainly use the UpdateAttribute processor to do this and a NiFi expression language statement as follows :

${filename:substringAfterLast('/')}

Thanks,

Matt

2 replies

MattWho
Titanium ⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️
May 4, 2017 11:29 PM UTC
@Prabir Guha

You would certainly use the UpdateAttribute processor to do this and a NiFi expression language statement as follows :

${filename:substringAfterLast('/')}

Thanks,

Matt

Translate
bbende
Gold ⭐️
Gold ⭐️
May 4, 2017 11:30 PM UTC

There is an expression language guide here:

https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html

For your example you should be able to create an UpdateAttribute processor and add a new property like:

myfilename = ${filename:substringAfterLast('/')}

Translate