Last active
May 14, 2022 14:32
-
-
Save h3xagn/d3ef4fe0c0e3fe09c2110fd73872930d to your computer and use it in GitHub Desktop.
Build ETL from device to cloud: https://h3xagn.com
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
//continuous export of data | |
.create-or-alter continuous-export ParquetExport over (raw_oil_data) to table factOilData | |
with | |
(intervalBetweenRuns=1h, sizeLimit=104857600) | |
<| raw_oil_data | |
//adding summarize query before parse to handle potential duplicate data | |
| summarize arg_max(TimeStamp, *) by TimeStamp, TagName | |
| project-away TimeStamp1 | |
//adding range check - between is inclusive at both limits | |
| where Value between (0 .. 10000) | |
//adding check to ensure TagName is not empty | |
| where isnotempty(TagName) | |
| parse TagName with Site: string '.' System: string '.' EqmtIp: string '.' Tag: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment