Integration / Apache NiFi Interview Questions
What is NiFi Expression Language and where can it be used?
NiFi Expression Language (EL) is a built-in expression engine enabling dynamic evaluation of FlowFile attribute values within processor property configurations. Instead of hardcoded values, you write expressions evaluated at runtime against each FlowFile's attributes using the syntax ${attribute.name}.
EL supports a rich function library:
String functions: ${filename:toUpper()}, ${mime.type:substringAfter('/')}, ${attr:startsWith('prefix')}, ${attr:replace('old','new')}
Math functions: ${count:toNumber():plus(1)}, ${size:multiply(2)}
Date/time: ${now():format('yyyy-MM-dd')}, ${attr:toDate('MM/dd/yyyy')}
Boolean / conditional: ${attr:equals('active'):ifElse('yes','no')}, ${attr:isEmpty():not()}
System: ${hostname()}, ${uuid()}, ${literal('fixed')}
EL can only be used in property fields that display the EL icon (a curved arrow) in the NiFi UI. In non-EL-enabled fields, the expression is treated as a literal string — no error is raised. Common applications include dynamic file paths, Kafka topic routing, SQL query construction, and HTTP endpoint URLs.
More Related questions...