blob: 0168245f7390eef33386051d3e3b7d82213488d7 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[121],{518:function(s,t,e){"use strict";e.r(t);var a=e(29),n=Object(a.a)({},(function(){var s=this,t=s._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[t("h1",{attrs:{id:"series-discovery"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#series-discovery"}},[s._v("#")]),s._v(" Series Discovery")]),s._v(" "),t("h2",{attrs:{id:"consecutivesequences"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#consecutivesequences"}},[s._v("#")]),s._v(" ConsecutiveSequences")]),s._v(" "),t("h3",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[s._v("#")]),s._v(" Usage")]),s._v(" "),t("p",[s._v("This function is used to find locally longest consecutive subsequences in strictly equispaced multidimensional data.")]),s._v(" "),t("p",[s._v("Strictly equispaced data is the data whose time intervals are strictly equal. Missing data, including missing rows and missing values, is allowed in it, while data redundancy and timestamp drift is not allowed.")]),s._v(" "),t("p",[s._v("Consecutive subsequence is the subsequence that is strictly equispaced with the standard time interval without any missing data. If a consecutive subsequence is not a proper subsequence of any consecutive subsequence, it is locally longest.")]),s._v(" "),t("p",[t("strong",[s._v("Name:")]),s._v(" CONSECUTIVESEQUENCES")]),s._v(" "),t("p",[t("strong",[s._v("Input Series:")]),s._v(" Support multiple input series. The type is arbitrary but the data is strictly equispaced.")]),s._v(" "),t("p",[t("strong",[s._v("Parameters:")])]),s._v(" "),t("ul",[t("li",[t("code",[s._v("gap")]),s._v(": The standard time interval which is a positive number with an unit. The unit is 'ms' for millisecond, 's' for second, 'm' for minute, 'h' for hour and 'd' for day. By default, it will be estimated by the mode of time intervals.")])]),s._v(" "),t("p",[t("strong",[s._v("Output Series:")]),s._v(" Output a single series. The type is INT32. Each data point in the output series corresponds to a locally longest consecutive subsequence. The output timestamp is the starting timestamp of the subsequence and the output value is the number of data points in the subsequence.")]),s._v(" "),t("p",[t("strong",[s._v("Note:")]),s._v(" For input series that is not strictly equispaced, there is no guarantee on the output.")]),s._v(" "),t("h3",{attrs:{id:"examples"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[s._v("#")]),s._v(" Examples")]),s._v(" "),t("h4",{attrs:{id:"manually-specify-the-standard-time-interval"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manually-specify-the-standard-time-interval"}},[s._v("#")]),s._v(" Manually Specify the Standard Time Interval")]),s._v(" "),t("p",[s._v("It's able to manually specify the standard time interval by the parameter "),t("code",[s._v("gap")]),s._v(". It's notable that false parameter leads to false output.")]),s._v(" "),t("p",[s._v("Input series:")]),s._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[s._v("+-----------------------------+---------------+---------------+\n| Time|root.test.d1.s1|root.test.d1.s2|\n+-----------------------------+---------------+---------------+\n|2020-01-01T00:00:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:05:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:10:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:20:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:25:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:30:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:35:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:40:00.000+08:00| 1.0| null|\n|2020-01-01T00:45:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:50:00.000+08:00| 1.0| 1.0|\n+-----------------------------+---------------+---------------+\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br"),t("span",{staticClass:"line-number"},[s._v("12")]),t("br"),t("span",{staticClass:"line-number"},[s._v("13")]),t("br"),t("span",{staticClass:"line-number"},[s._v("14")]),t("br")])]),t("p",[s._v("SQL for query:")]),s._v(" "),t("div",{staticClass:"language-sql line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sql"}},[t("code",[t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" consecutivesequences"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("s1"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("s2"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v("'gap'")]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v("'5m'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" root"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("test"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("d1\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br")])]),t("p",[s._v("Output series:")]),s._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[s._v('+-----------------------------+------------------------------------------------------------------+\n| Time|consecutivesequences(root.test.d1.s1, root.test.d1.s2, "gap"="5m")|\n+-----------------------------+------------------------------------------------------------------+\n|2020-01-01T00:00:00.000+08:00| 3|\n|2020-01-01T00:20:00.000+08:00| 4|\n|2020-01-01T00:45:00.000+08:00| 2|\n+-----------------------------+------------------------------------------------------------------+\n')])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br")])]),t("h4",{attrs:{id:"automatically-estimate-the-standard-time-interval"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automatically-estimate-the-standard-time-interval"}},[s._v("#")]),s._v(" Automatically Estimate the Standard Time Interval")]),s._v(" "),t("p",[s._v("When "),t("code",[s._v("gap")]),s._v(" is default, this function estimates the standard time interval by the mode of time intervals and gets the same results. Therefore, this usage is more recommended.")]),s._v(" "),t("p",[s._v("Input series is the same as above, the SQL for query is shown below:")]),s._v(" "),t("div",{staticClass:"language-sql line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sql"}},[t("code",[t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" consecutivesequences"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("s1"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("s2"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" root"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("test"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("d1\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br")])]),t("p",[s._v("Output series:")]),s._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[s._v("+-----------------------------+------------------------------------------------------+\n| Time|consecutivesequences(root.test.d1.s1, root.test.d1.s2)|\n+-----------------------------+------------------------------------------------------+\n|2020-01-01T00:00:00.000+08:00| 3|\n|2020-01-01T00:20:00.000+08:00| 4|\n|2020-01-01T00:45:00.000+08:00| 2|\n+-----------------------------+------------------------------------------------------+\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br")])]),t("h2",{attrs:{id:"consecutivewindows"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#consecutivewindows"}},[s._v("#")]),s._v(" ConsecutiveWindows")]),s._v(" "),t("h3",{attrs:{id:"usage-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage-2"}},[s._v("#")]),s._v(" Usage")]),s._v(" "),t("p",[s._v("This function is used to find consecutive windows of specified length in strictly equispaced multidimensional data.")]),s._v(" "),t("p",[s._v("Strictly equispaced data is the data whose time intervals are strictly equal. Missing data, including missing rows and missing values, is allowed in it, while data redundancy and timestamp drift is not allowed.")]),s._v(" "),t("p",[s._v("Consecutive window is the subsequence that is strictly equispaced with the standard time interval without any missing data.")]),s._v(" "),t("p",[t("strong",[s._v("Name:")]),s._v(" CONSECUTIVEWINDOWS")]),s._v(" "),t("p",[t("strong",[s._v("Input Series:")]),s._v(" Support multiple input series. The type is arbitrary but the data is strictly equispaced.")]),s._v(" "),t("p",[t("strong",[s._v("Parameters:")])]),s._v(" "),t("ul",[t("li",[t("code",[s._v("gap")]),s._v(": The standard time interval which is a positive number with an unit. The unit is 'ms' for millisecond, 's' for second, 'm' for minute, 'h' for hour and 'd' for day. By default, it will be estimated by the mode of time intervals.")]),s._v(" "),t("li",[t("code",[s._v("length")]),s._v(": The length of the window which is a positive number with an unit. The unit is 'ms' for millisecond, 's' for second, 'm' for minute, 'h' for hour and 'd' for day. This parameter cannot be lacked.")])]),s._v(" "),t("p",[t("strong",[s._v("Output Series:")]),s._v(" Output a single series. The type is INT32. Each data point in the output series corresponds to a consecutive window. The output timestamp is the starting timestamp of the window and the output value is the number of data points in the window.")]),s._v(" "),t("p",[t("strong",[s._v("Note:")]),s._v(" For input series that is not strictly equispaced, there is no guarantee on the output.")]),s._v(" "),t("h3",{attrs:{id:"examples-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#examples-2"}},[s._v("#")]),s._v(" Examples")]),s._v(" "),t("p",[s._v("Input series:")]),s._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[s._v("+-----------------------------+---------------+---------------+\n| Time|root.test.d1.s1|root.test.d1.s2|\n+-----------------------------+---------------+---------------+\n|2020-01-01T00:00:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:05:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:10:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:20:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:25:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:30:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:35:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:40:00.000+08:00| 1.0| null|\n|2020-01-01T00:45:00.000+08:00| 1.0| 1.0|\n|2020-01-01T00:50:00.000+08:00| 1.0| 1.0|\n+-----------------------------+---------------+---------------+\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br"),t("span",{staticClass:"line-number"},[s._v("12")]),t("br"),t("span",{staticClass:"line-number"},[s._v("13")]),t("br"),t("span",{staticClass:"line-number"},[s._v("14")]),t("br")])]),t("p",[s._v("SQL for query:")]),s._v(" "),t("div",{staticClass:"language-sql line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-sql"}},[t("code",[t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("select")]),s._v(" consecutivewindows"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("s1"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("s2"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v("'length'")]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v("'10m'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" root"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("test"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("d1\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br")])]),t("p",[s._v("Output series:")]),s._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[s._v('+-----------------------------+--------------------------------------------------------------------+\n| Time|consecutivewindows(root.test.d1.s1, root.test.d1.s2, "length"="10m")|\n+-----------------------------+--------------------------------------------------------------------+\n|2020-01-01T00:00:00.000+08:00| 3|\n|2020-01-01T00:20:00.000+08:00| 3|\n|2020-01-01T00:25:00.000+08:00| 3|\n+-----------------------------+--------------------------------------------------------------------+\n')])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br")])])])}),[],!1,null,null,null);t.default=n.exports}}]);