Drop readings that never arrived
Your task
Given readings with columns device, ts and reading, drop the rows whose reading is missing. Return device, ts and reading, sorted by device ascending and then ts ascending.
Examples
drop_missing(readings: dataframe) -> dataframeExample 1
Input
drop_missing(readings)readings
| device | ts | reading |
|---|---|---|
| a1 | 2024-05-01 | 20.5 |
| a1 | 2024-05-02 | NULL |
| a1 | 2024-05-03 | 22.5 |
| b2 | 2024-05-01 | NULL |
| b2 | 2024-05-02 | 31 |
| b2 | 2024-05-03 | 33 |
Output
| device | ts | reading |
|---|---|---|
| a1 | 2024-05-01 | 20.5 |
| a1 | 2024-05-03 | 22.5 |
| b2 | 2024-05-02 | 31 |
| b2 | 2024-05-03 | 33 |