title: BigQuery, fill missing values with Linear interpolation
body: <p>I have a table in Bigquery with data every 30 minutes, I want to show the data every 5 minutes, currently I am using this query to fill the null values with the existing values</p>
  
  <pre><code>SELECT
  SETTLEMENTDATE,DUID,
  LAST_VALUE(SCADAVALUE ignore nulls) OVER (
      PARTITION BY DUID ORDER BY SETTLEMENTDATE) AS SCADAVALUE from x
  </code></pre>
  
  <p>instead, is it possible to do Linear interpolation, something like this</p>
  
  <p><a href="https://i.stack.imgur.com/ZM5It.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZM5It.png" alt="enter image description here"></a></p>
  
  <p>I have the column settlement date which is by 5 minutes, the column SCADAVALUEORIGIN Which has a value very 30 minutes, otherwise it is null, I want to add a column SCADAINTERPOLATION, which spread the values evenly between two the values of 30 minute, another issue is, as I refresh the data every 5 minutes, the last value will show null for (5,10,15,20,25) minutes, I hope, my explanation is clear</p>