Passing statusCode through custom normalization


#1

We would like to propagate information in the statusCode field of TSDataPoint to NormTimeseriesDouble in the same way as missing and estimates are propagated, ideally.
What is the recommended way for going about this?

Thanks


#2

I am thinking about an actionDecl SimpleMetric, which would put into data the (cast version of) statusCode of each corresponding TSDataPoint. Given the action’s SimpleMetric parameter’s path to the header, I could fetch a stream of PointMeasurements using the TSEvalSpec parameter (like for normalization) then convert them to TSDataPoints and finally create a NormTimeseries with the desired data.
Am I missing something?


#3

In your simple metric expression, use “normalized.data.statusCode”

Make sure that the “statusCode” field is normalized using the @ts annotation


#4

@AlexBakic @Riley is correct. What I would like to add is in order to to normalize string based fields we’ll need enum mapping for them. See thread here for details: Can I normalize string field?


#5

We tried it and it worked (in v7.8 only). However, using statusCode as value is tricky in general (wrt. e.g. deduplication, which we want to keep the semantics related to the real values). So we will instead create a separate function (to be launched via a batch), as we also need supplementary data to satisfy the requirements.