Unable to extract values in EPL

I have an EPL program which should run at everyday at a specific time to fetch values from measurements and perform calculations and store it back in measurements. We are able to fetch measurement values, but not able to extract those values and store the calculated values. We had tried the methods mentioned below and referred some sample EPL apps but solution not found.

//Method-1
‘’’
log "Find new measurement response : " + resp.measurement.params[“fragmentType.series”].toString() at INFO;
log "Find new measurement response : " + resp.measurement.params[“fragmentType.series”].toString() at INFO; ’
//Method -2
’ AnyExtractor val:= AnyExtractor(resp.measurement.getAny[“parameter_name”]);
log “val” +val.toString() at INFO;

As mentioned above , fetching the values and extracting them for further requirement is done. Considering the logs, values are fetched from measurement API but not extracted for further process.

Please provide solution for this.

If you want to extract measurements values and not arbitrary properties you should use the “measurements” field:

resp.measurement.measurements["fragmentType"]["series"]

or using AnyExtractor:

AnyExtractor(resp.measurement.measurements]).getAny("fragmentType.series")

or if you know it is a number:

AnyExtractor(resp.measurement.measurements]).getFloat("fragmentType.series")

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.