kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject kylin git commit: add blog about percentile measure
Date Tue, 04 Apr 2017 11:28:58 GMT
Repository: kylin
Updated Branches:
  refs/heads/document 2643398c1 -> 3ac39cc57


add blog about percentile measure


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3ac39cc5
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3ac39cc5
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3ac39cc5

Branch: refs/heads/document
Commit: 3ac39cc57fd17589eddcff6c605acae6f4e03677
Parents: 2643398
Author: lidongsjtu <lidong@apache.org>
Authored: Tue Apr 4 19:28:44 2017 +0800
Committer: lidongsjtu <lidong@apache.org>
Committed: Tue Apr 4 19:28:44 2017 +0800

----------------------------------------------------------------------
 .../blog/2017-04-01-percentile-measure.md       |  37 +++++++++++++++++++
 website/images/blog/percentile_1.png            | Bin 0 -> 102826 bytes
 website/images/blog/percentile_2.png            | Bin 0 -> 179207 bytes
 website/images/blog/percentile_3.png            | Bin 0 -> 252693 bytes
 4 files changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/3ac39cc5/website/_posts/blog/2017-04-01-percentile-measure.md
----------------------------------------------------------------------
diff --git a/website/_posts/blog/2017-04-01-percentile-measure.md b/website/_posts/blog/2017-04-01-percentile-measure.md
new file mode 100644
index 0000000..4db628e
--- /dev/null
+++ b/website/_posts/blog/2017-04-01-percentile-measure.md
@@ -0,0 +1,37 @@
+---
+layout: post-blog
+title:  A new measure for Percentile precalculation
+date:   2017-04-01 22:22:22
+author: Dong Li
+categories: blog
+---
+
+## Introduction
+
+Since Apache Kylin 2.0, there's a new measure for percentile precalculation, which aims at
(sub-)second latency for **approximate** percentile analytics SQL queries. The implementation
is based on [t-digest](https://github.com/tdunning/t-digest) library under Apachee 2.0 license,
which provides a high-effecient data structure to save aggregation counters and algorithm
to calculate approximate result of percentile.
+
+### Percentile
+*From [wikipedia](https://en.wikipedia.org/wiki/Percentile)*: A **percentile** (or a **centile**)
is a measure used in statistics indicating the value below which a given percentage of
observations in a group of observations fall. For example, the 20th percentile is the value
(or score) below which 20% of the observations may be found.
+
+In Apache Kylin, we support the similar SQL sytanx like Apache Hive, with a aggregation function
called **percentile(\<Number Column\>, \<Double\>)**:
+
+```sql
+SELECT seller_id, percentile(price, 0.5)
+FROM test_kylin_fact
+GROUP BY seller_id
+```
+
+### How to use
+If you know little about *Cubes*, please go to [QuickStart](http://kylin.apache.org/docs20/tutorial/kylin_sample.html)
first to learn basic knowledge.
+
+Firstly, you need to add this column as measure in data model.
+
+![](/images/blog/percentile_1.png)
+
+Secondly, create a cube and add a PERCENTILE measure.
+
+![](/images/blog/percentile_2.png)
+
+Finally, build the cube and try some query.
+
+![](/images/blog/percentile_3.png)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/3ac39cc5/website/images/blog/percentile_1.png
----------------------------------------------------------------------
diff --git a/website/images/blog/percentile_1.png b/website/images/blog/percentile_1.png
new file mode 100644
index 0000000..edcd8e9
Binary files /dev/null and b/website/images/blog/percentile_1.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/3ac39cc5/website/images/blog/percentile_2.png
----------------------------------------------------------------------
diff --git a/website/images/blog/percentile_2.png b/website/images/blog/percentile_2.png
new file mode 100644
index 0000000..f34517f
Binary files /dev/null and b/website/images/blog/percentile_2.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/3ac39cc5/website/images/blog/percentile_3.png
----------------------------------------------------------------------
diff --git a/website/images/blog/percentile_3.png b/website/images/blog/percentile_3.png
new file mode 100644
index 0000000..38ad47a
Binary files /dev/null and b/website/images/blog/percentile_3.png differ


Mime
View raw message