{"id":93,"date":"2022-12-14T10:29:15","date_gmt":"2022-12-14T10:29:15","guid":{"rendered":"https:\/\/demo.mekshq.com\/awsm-wp\/?p=93"},"modified":"2024-08-03T14:49:27","modified_gmt":"2024-08-03T14:49:27","slug":"time-series-database-and-analytics-using-azure-data-explorer","status":"publish","type":"post","link":"https:\/\/dipankar.me\/yogesh\/time-series-database-and-analytics-using-azure-data-explorer\/","title":{"rendered":"Spiro &amp; Ola Electric"},"content":{"rendered":"\n<div dir=\"ltr\" class=\"reader-article-content reader-article-content--content-blocks\">\n          \n          \n        \n    <p id=\"ember335\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->In this article, I will be giving a brief summary of the Time Series Database and how it can be used for Advanced Analytics, we will also cover Azure Data Explorer : A Powerful time series database, this is one of the first article in the series of Timeseries: ADX articles that I am planning to publish, so lets start with these basic 3 questions<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember336\" class=\"ember-view reader-text-block__paragraph\">\n            <ol><li><span class=\"white-space-pre\"> <\/span>What is a Time series Database?<!----><\/li><li><!---->Why Time-series DB?<span class=\"white-space-pre\"> <\/span><\/li><li><!---->How to do Advanced Analytics with ADX: Time Series&nbsp;DB<!----><\/li><\/ol>\n\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <h2 id=\"ember337\" class=\"ember-view reader-text-block__heading-2\">\n      <!---->1. What is a Time Series Database?<!---->\n<!---->    <\/h2>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember338\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->A Time series database is a database that is capable of storing high-frequency, streaming data in time series, it stores information or data part of a \u201ctime series,\u201d which is a set of data points that are associated with timestamps. Due to this, the time series database size grows very fast in a short amount of time. We will talk more about its characteristics further, for now, let&#8217;s look at popular TimeSeries Databases<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember339\" class=\"ember-view reader-text-block__paragraph\">\n            <ol><li><!---->Influxdb<span class=\"white-space-pre\"> <\/span><\/li><li><!---->Apache Druid<span class=\"white-space-pre\"> <\/span><\/li><li><!---->Azure Data Explorer ( ADX \/Kusto)<!----><\/li><li><!---->TimescaleDB<!----><\/li><\/ol>\n\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n            \n    <div class=\"reader-image-block reader-image-block--full-width\">\n      <figure class=\"reader-image-block__figure\">\n          \n    <div class=\"ivm-image-view-model   \">\n        \n    <div class=\"ivm-view-attr__img-wrapper\n        \n        \">\n<!---->\n<!---->          <img decoding=\"async\" src=\"https:\/\/media.licdn.com\/dms\/image\/D4D12AQG2WGyqO65TFQ\/article-inline_image-shrink_1500_2232\/0\/1671188127823?e=1727913600&amp;v=beta&amp;t=LfgFALq1HceYg8mItbU-Y8owmcU9UGMrbHhJ-5iQmdc\" loading=\"lazy\" alt=\"No alt text provided for this image\" id=\"ember340\" class=\"ivm-view-attr__img--centered  reader-image-block__img evi-image lazy-image ember-view\">\n    <\/div>\n  \n          <\/div>\n  \n\n          <figcaption class=\"reader-image-block__figure-image-caption display-block full-width text-body-small-open t-sans text-align-center t-black--light\">\n            <!---->Time Series Database<!---->\n          <\/figcaption>\n      <\/figure>\n    <\/div>\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <h2 id=\"ember341\" class=\"ember-view reader-text-block__heading-2\">\n      <!---->2. Why Time Series?<!---->\n<!---->    <\/h2>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember342\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->The data coming from Sensors, Scooters, Cars, and Devices running for long hours is usually coming in milliseconds, or nanoseconds, so to store and fetch this data from relational databases or NOSQL databases is not a perfect match, storing and optimising this on<span class=\"white-space-pre\"> <\/span><strong><!---->timestamp<!----><\/strong><span class=\"white-space-pre\"> <\/span>till nanoseconds level and ability to<span class=\"white-space-pre\"> <\/span><strong><!---->fetch, partition the data on timestamp<!----><\/strong><span class=\"white-space-pre\"> <\/span>is inbuilt to time series database<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember343\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->If you see the characteristic of the data here, it is a stream of data coming at a very high frequency, like every second.&nbsp; Time dimension takes a crucial role here. A time series database helps to partition this data on time.<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <blockquote id=\"ember344\" class=\"ember-view reader-text-block__blockquote\">\n      <!---->The best way to analyze the things which are constantly fluctuating i.e.,<span class=\"white-space-pre\"> <\/span><span class=\"tvm-operation__underline\"><!---->Non-Stationary Data<!----><\/span><span class=\"white-space-pre\"> <\/span>over time is by using Time Series<!---->\n<!---->    <\/blockquote>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember345\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Partitioning data on time helps sort the out-of-order data and ordered data separately. This immensely improves the analytical queries, data engineering jobs, and data scientist models running on it. Also, the data is indexed on time, so fetching data based on time is fast. It also supports time-based joins across multiple tables for effective analytics.<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n            \n    <div class=\"reader-image-block reader-image-block--full-width\">\n      <figure class=\"reader-image-block__figure\">\n          \n    <div class=\"ivm-image-view-model   \">\n        \n    <div class=\"ivm-view-attr__img-wrapper\n        \n        \">\n<!---->\n<!---->          <img decoding=\"async\" src=\"https:\/\/media.licdn.com\/dms\/image\/D4D12AQFWXvJ5dhO8uQ\/article-inline_image-shrink_1500_2232\/0\/1671119655735?e=1727913600&amp;v=beta&amp;t=6zDXPozExCL6ythPHaQz2Rpl2wPuF9hfOjD3rw-80N4\" loading=\"lazy\" alt=\"No alt text provided for this image\" id=\"ember346\" class=\"ivm-view-attr__img--centered  reader-image-block__img evi-image lazy-image ember-view\">\n    <\/div>\n  \n          <\/div>\n  \n\n          <figcaption class=\"reader-image-block__figure-image-caption display-block full-width text-body-small-open t-sans text-align-center t-black--light\">\n            <!---->Fetching data from the devices within milliseconds<!---->\n          <\/figcaption>\n      <\/figure>\n    <\/div>\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember347\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->A few of the things that a time series database is good at for the live streaming data is<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember348\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->a)<span class=\"white-space-pre\"> <\/span><strong><!---->Low latency<!----><\/strong><span class=\"white-space-pre\"> <\/span>for data ingestion from the sensor to the database<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember349\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->b)<span class=\"white-space-pre\"> <\/span><strong><!---->High write throughput<span class=\"white-space-pre\"> <\/span><\/strong><!---->as the time series data is live, write-heavy, and highly concurrent<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember350\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->c)<span class=\"white-space-pre\"> <\/span><strong><!---->High read throughput<!----><\/strong><span class=\"white-space-pre\"> <\/span>as the time series data is to be read and instantly presented on BI Tools<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember351\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->d)<span class=\"white-space-pre\"> <\/span><strong><!---->High data compression<span class=\"white-space-pre\"> <\/span><\/strong><!---->within a day millions of records are added, these should be compressed while ingestion or while storage to avoid extremely large disk size consumption<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember352\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Azure Data Explorer is a fully managed PaaS service from Azure, it comes as a very good option for Time Series Database it fits in all the above requirements and it also has a great computing power to process the live streaming data and historical data stored in ADX cluster<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <blockquote id=\"ember353\" class=\"ember-view reader-text-block__blockquote\">\n      <!---->Time Series can be created and analysed within a few seconds in Azure Data Explorer<!---->\n<!---->    <\/blockquote>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember354\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->ADX has the ability to generate real-time alerts based on the data that is ingested into ADX, it can run rules against the data in flight and generate alerts, emails<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember355\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->ADX also has very good integration with all Azure Services like Logic App, Event Hub, Blob Storage, and Application insights, in fact, the journey of ADX ( Kusto ) started at Microsoft as a log aggregator, it is being used as a log engine of all Azure services for last 10 years, in 2021 it was publicly launched to be used as Time Series Database<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember356\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->It has some great machine learning features, trends, correlations, and models can be executed on the fly and visualisations can be generated using&nbsp;UI\/UX and BI tools<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember357\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Other striking features of ADX<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember358\" class=\"ember-view reader-text-block__paragraph\">\n            <ol><li><!---->It is used as a logging solution for all Microsoft Services in the background for the last 10 years<span class=\"white-space-pre\"> <\/span><\/li><li><!---->So it&#8217;s a proven solution, as per Microsoft documentation daily 100 Petabytes of data is ingested in ADX, a very powerful data ingestion system<span class=\"white-space-pre\"> <\/span><\/li><li><!---->Use intuitive and powerful KQL ( Kusto Query Language ), Azure Log Analytics queries are actually KQL queries so upskilling for Azure resources should not be a big challenge<span class=\"white-space-pre\"> <\/span><\/li><li><!---->For SQL users there will be a bit of learning but should be easily manageable, they can start with TSQL and gradually mode to<span class=\"white-space-pre\"> <\/span><\/li><li><!---->Direct integration point with all Azure services and multiple other third-party services<span class=\"white-space-pre\"> <\/span><\/li><li><!---->Plotting trends and applying toner machine learning algorithms becomes easy using ADX features<span class=\"white-space-pre\"> <\/span><\/li><\/ol>\n\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <h2 id=\"ember359\" class=\"ember-view reader-text-block__heading-2\">\n      <!---->3. How to do Advanced Analytics with ADX: Time Series DB?<!---->\n<!---->    <\/h2>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember360\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->ADX for Time Series Analytics<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember361\" class=\"ember-view reader-text-block__paragraph\">\n            <ol><li><!---->Inbuilt support for TimeSeries creation<span class=\"white-space-pre\"> <\/span><\/li><li><!---->Inbuilt functions for anomaly detection and forecasting<span class=\"white-space-pre\"> <\/span><\/li><li><!---->Inbuilt support for ML algorithm integration<span class=\"white-space-pre\"> <\/span><\/li><\/ol>\n\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n            \n    <div class=\"reader-image-block reader-image-block--full-width\">\n      <figure class=\"reader-image-block__figure\">\n          \n    <div class=\"ivm-image-view-model   \">\n        \n    <div class=\"ivm-view-attr__img-wrapper\n        \n        \">\n<!---->\n<!---->          <img decoding=\"async\" src=\"https:\/\/media.licdn.com\/dms\/image\/D4D12AQEiKdOATbDxcw\/article-inline_image-shrink_1500_2232\/0\/1671191255465?e=1727913600&amp;v=beta&amp;t=PxVLD-8QK9fDt8bwvViUE_4rFF3ks8QeQqysoEMq13I\" loading=\"lazy\" alt=\"No alt text provided for this image\" id=\"ember362\" class=\"ivm-view-attr__img--centered  reader-image-block__img evi-image lazy-image ember-view\">\n    <\/div>\n  \n          <\/div>\n  \n\n          <figcaption class=\"reader-image-block__figure-image-caption display-block full-width text-body-small-open t-sans text-align-center t-black--light\">\n            <!---->Advanced Analytics with ADX<!---->\n          <\/figcaption>\n      <\/figure>\n    <\/div>\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember363\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->In the next few articles, I am going to cover different aspects of the ADX Timeseries database and do a deep dive into it<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember364\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Let me know what role you play: Are you a Data Engineer, Data Scientist, or Data Analyst, and are you already using any Timeseries database, also let me know what aspect of the Timeseries database you would like to know more &#8211; about so that I cover that in my next article, also if you are interested in learning ADX: Time Series database architecture and implementation, I will be happy to share<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember365\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Hope you enjoyed the article, thanks for reading<span class=\"white-space-pre\"> <\/span>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember366\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Cheers<!---->\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember367\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Yogesh<!---->\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember368\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Happy reading, happy learning &#8230;<!---->\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n          \n        \n    <p id=\"ember369\" class=\"ember-view reader-text-block__paragraph\">\n      <!---->Follow me here<span class=\"white-space-pre\"> <\/span><a class=\"app-aware-link \" href=\"https:\/\/www.linkedin.com\/feed\/hashtag\/?keywords=digitaldipankar\" data-test-app-aware-link=\"\"><span class=\"visually-hidden\">hashtag<\/span><span><span aria-hidden=\"true\">#<\/span>DigitalDipankar<\/span><\/a>\n<!---->    <\/p>\n\n  \n\n<!---->\n<!---->\n<!---->\n<!---->\n<!---->\n  \n      <\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this article, I will be giving a brief summary of the Time Series Database and how it can be used for Advanced Analytics, we will also cover Azure Data Explorer : A Powerful time series database, this is&#8230;<\/p>\n","protected":false},"author":1,"featured_media":604,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[31],"class_list":["post-93","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cognizant-technology-solutions","tag-jan-2007-dec-2014"],"_links":{"self":[{"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/posts\/93"}],"collection":[{"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":4,"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":624,"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/posts\/93\/revisions\/624"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/media\/604"}],"wp:attachment":[{"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dipankar.me\/yogesh\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}