Querying normalized data


Is there a way to query and return the normalized data directly? I am asking because I’m trying to debug metric results, and specifically to narrow down if the issue is related to normalization or the metric expression itself.


yes. you can execute a query using tsEval on the timeseries header. E.g.

PhysicalMeasurementSeries.tsEval({projection:“sum(normalized.data.quantity)”, start:“2010-01-01”, end:“2011-01-01”, interval: “MONTH”, filter:“id == ‘YOUR_MS_ID’”})


Is there a way of getting the normalized data without apply any transform? In the example you gave, you are applying the sum transform to the raw data. I assume that there is a cassandra column that is storing the normalized data, how can I just get that column’s raw values?


you can call

NormalizedTimeseriesPersister.getId(PhysicalMeasurementSeries.normalizedTimeseriesKey(‘YOUR_MS_ID’, ‘TS_FIELD_NAME’))