You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Pierre Villard (Jira)" <ji...@apache.org> on 2026/03/03 08:41:00 UTC
[jira] [Resolved] (NIFI-15649) Add Expression Language functions compactDelimitedList() and trimDelimitedList() for delimited string cleanup
[ https://issues.apache.org/jira/browse/NIFI-15649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre Villard resolved NIFI-15649.
-----------------------------------
Fix Version/s: 2.9.0
Assignee: Richard Scott
Resolution: Fixed
> Add Expression Language functions compactDelimitedList() and trimDelimitedList() for delimited string cleanup
> -------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-15649
> URL: https://issues.apache.org/jira/browse/NIFI-15649
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: 2.8.0
> Reporter: Richard Scott
> Assignee: Richard Scott
> Priority: Minor
> Fix For: 2.9.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Add two new Apache NiFi Expression Language functions to simplify cleanup of list-like attributes represented as delimited strings.
> In NiFi flows, delimited attributes are often built from optional values or accumulated over time. This commonly produces leading, trailing, or repeated delimiters, resulting in empty tokens such as:
> * {{,a,b,c,,}}
> * {{alpha,,beta,,,gamma}}
> * {{,,a,,b,,}}
> Today this usually requires brittle chains of {{{}replace{}}}, regex, or custom scripting. Dedicated Expression Language functions would make these common cleanup operations easier to read, easier to maintain, and more intention-revealing in flows.
>
> h3. Proposed Functions
> h4. {{compactDelimitedList(delimiter)}}
> Removes *all empty tokens* from a delimited string, preserves the order of non-empty tokens, and rejoins using the same delimiter.
> Examples with delimiter {{{},{}}}:
> * {{,a,b,c,,}} → {{a,b,c}}
> * {{a,,b,,,c}} → {{a,b,c}}
> * {{,,,}} → ``
> h4. {{trimDelimitedList(delimiter)}}
> Removes only *leading and trailing empty tokens* from a delimited string, while preserving {*}interior empty tokens{*}, preserving token order, and rejoining using the same delimiter.
> Examples with delimiter {{{},{}}}:
> * {{,a,b,c,,}} → {{a,b,c}}
> * {{,,a,,b,,}} → {{a,,b}}
> * {{a,,b,,,c}} → {{a,,b,,,c}}
> * {{,,,}} → ``
--
This message was sent by Atlassian Jira
(v8.20.10#820010)