You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: code/datamodel/operationaldb.kql
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,16 @@
79
79
)
80
80
81
81
// Create function
82
+
.create-or-alterfunctionwith (docstring = 'Function to get latest threshold value for named threshold', folder='thresholds') GetThreshold(valueName: string) {
83
+
toscalar(
84
+
thresholds
85
+
| where name == valueName
86
+
| orderby timestamp desc
87
+
| limit1
88
+
| summarizemax(value)
89
+
)
90
+
}
91
+
82
92
.create-or-alterfunctionwith (docstring = 'Function to get average happiness scores for iptv data', folder='iptv') IptvGetAvgHappinessScore() {
.create-or-alterfunctionwith (docstring = 'Function to get latest threshold value for named threshold', folder='thresholds') GetThreshold(valueName: string) {
0 commit comments