Is it possible to run compile on a JMESPath expression which includes references to custom functions?
To provide a specific use case: we are using compile as a way of validating input on a form. However ever since we introduced custom functions, we've been unable to use compile anymore since (as far as we can tell) we cannot pass the relevant options.
This has resulted in two workarounds:
use search with data={} instead of compile for validation
allow null as inputs for out custom functions (since these values are not known at validation time)
However this means that expressions with custom functions such as join often do not work for us since:
a) they do not allow null values as input
b) the fields inputs used are not known at validation time, which result in them being null
Is it possible to run
compile
on a JMESPath expression which includes references to custom functions?To provide a specific use case: we are using
compile
as a way of validating input on a form. However ever since we introduced custom functions, we've been unable to usecompile
anymore since (as far as we can tell) we cannot pass the relevant options.This has resulted in two workarounds:
search
withdata={}
instead of compile for validationnull
as inputs for out custom functions (since these values are not known at validation time)However this means that expressions with custom functions such as
join
often do not work for us since: a) they do not allow null values as input b) the fields inputs used are not known at validation time, which result in them beingnull