I know this doesn’t really answer the question, but in most cases couldn’t
you use EL ${now()} in the record path statement and it would get evaluated
before the record path?

On Fri, Jul 26, 2019 at 6:42 PM Mike Thomsen <mikerthom...@gmail.com> wrote:

> I tried to creating a simple now() timestamp function and got this:
>
> org.apache.nifi.record.path.exception.RecordPathException:
> org.antlr.runtime.tree.RewriteEmptyStreamException: rule optionalArgument
>
> at org.apache.nifi.record.path.RecordPath.compile(RecordPath.java:105)
> at
>
> org.apache.nifi.record.path.TestRecordPath.testNowFunction(TestRecordPath.java:1284)
> <Remove JUnit/IntelliJ runner statements>
> Caused by: org.antlr.runtime.tree.RewriteEmptyStreamException: rule
> optionalArgument
> at
>
> org.antlr.runtime.tree.RewriteRuleElementStream._next(RewriteRuleElementStream.java:158)
> at
>
> org.antlr.runtime.tree.RewriteRuleElementStream.nextTree(RewriteRuleElementStream.java:145)
> at
>
> org.apache.nifi.record.path.RecordPathParser.argumentList(RecordPathParser.java:1633)
> at
>
> org.apache.nifi.record.path.RecordPathParser.function(RecordPathParser.java:1708)
> at
>
> org.apache.nifi.record.path.RecordPathParser.expression(RecordPathParser.java:1169)
> at
>
> org.apache.nifi.record.path.RecordPathParser.argument(RecordPathParser.java:1461)
> at
>
> org.apache.nifi.record.path.RecordPathParser.optionalArgument(RecordPathParser.java:1523)
> at
>
> org.apache.nifi.record.path.RecordPathParser.argumentList(RecordPathParser.java:1583)
> at
>
> org.apache.nifi.record.path.RecordPathParser.function(RecordPathParser.java:1708)
> at
>
> org.apache.nifi.record.path.RecordPathParser.pathOrFunction(RecordPathParser.java:4312)
> at
>
> org.apache.nifi.record.path.RecordPathParser.pathExpression(RecordPathParser.java:4367)
> at org.apache.nifi.record.path.RecordPath.compile(RecordPath.java:84)
> ... 23 more
>
> Am I trying to do something that the RecordPath grammar doesn't accept?
>
> Thanks,
>
> Mike
>
-- 
Sent from Gmail Mobile

Reply via email to