Evaluate text as expression [DONE]


We want to dynamically generate data quality expressions e.g. VARIABLE_1 >= 1 then return 1, else 0.

Is there way to evaluate a text string “VARIABLE_1 >= 1” as an expression ?

Thanks !

Function eval() is already planned for v4.3. No way to evaluate a text string until then.

Thanks !

Do you have already an idea how this function will work?

Something like this ?


It will evaluate a text string as an EasyMorph expression. However, an expression must be the same for all rows. It won’t allow using different expressions for different rows. As a consequence, references to field names may not be available in some or all cases.


The use case is the following.

Subsidies are only awarded when requirements are met.

In a dataset of awarded subsidies, we have to check several conditions. Each row in the dataset is an awarded subsidy.
If we could describe the conditions for each type subsidy in an excel file as an EasyMorph expression expressed as text, we could join this table with our actual dataset. Then we should be able to interpret the string with the condition as expression.
The result of parsing the expressions is a TRUE or FALSE (condition met or not).
We also plan to add validity dates to the condition table so that we can use interval merge to attach the right set of conditions to each record in the dataset.

Maybe this would be possible using iteration and passing the condition string to a submodule and use the eval() function there ?

Thanks !

I can’t say if it will be possible or not – the eval() function is not ready yet.

If the conditions are simple, maybe you need to encode them somehow and then parse it in EasyMorph.