Created
February 14, 2022 20:52
-
-
Save gharriso/8696c59e4cb404a474519ab95126bf11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agg01.push({ | |
$setWindowFields: { | |
partitionBy: '$deviceData', | |
sortBy: { | |
timeStamp: 1 | |
}, | |
output: { | |
movingAverage: { | |
$avg: '$measurement', | |
window: { | |
range: [-6, -0], | |
unit: 'day' | |
} | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment