Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
With the ability for Processors to use arbitrary variables in the Expression Language, based on what a Processor provides, a powerful feature would be to reference a specific field in delimited text data. For example, this can be used with RouteText to very effectively route CSV (or tab-delimited, or any other type of delimited text) data.
If we have the following line:
1,84,Mark,555-555-5555,123 My Street,"My City, MS"
We should be able to reference the city & state and capitalize it by using:
${line:getDelimitedField(6):toUpper()}
Similarly, if we have:
1|84|Mark|555-555-5555|123 My Street|My City, MS
We should use:
${line:getDelimitedField(6, '|'):toUpper()}
Finally, we should be able to specify an enclosing string so that if we have:
1,84,Mark,555-555-5555,123 My Street, __My City, MS__
We can access it via:
${line:getDelimitedField(6, '|', '__'):toUpper()}