Joining two measurements with diferent sample frequencies


I’m trying to solve se following problem:

There is a measurement with the sample time of 30 seconds (Measurement 1), and there is a measurement with the sample time of 2 miliseconds (Measurement 2).

I need to join this two streams together (in a tick script) to produce the output as in the figure. The Measurement 1 must be oversampled/repeated every time a point from Measurement 2 arrives.

I tried the following tick script:

var features = stream

var models = stream

var data = features

But it is producing an output that is not what i want:

(Note the timestamps, they are 30s spaced, all the data that arrives every 2ms is getting lost)