zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject zeppelin git commit: [ZEPPELIN-3710] Add to the SAP documentation limit and distinct description
Date Tue, 18 Sep 2018 00:28:43 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 7856e8859 -> bce9d2479


[ZEPPELIN-3710] Add to the SAP documentation limit and distinct description

Add to the SAP documentation `limit` and `distinct` keywords description which have been added
in [ZEPPELIN-3677](https://github.com/apache/zeppelin/pull/3106)

Improvement

[ZEPPELIN-3710](https://issues.apache.org/jira/browse/ZEPPELIN-3710)

* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Updated

Author: oxygen311 <alex39-09@mail.ru>

Closes #3138 from oxygen311/ZEPPELIN-3710 and squashes the following commits:

77ffd47e3 [oxygen311] Add SAP Docs

(cherry picked from commit b958d4c30da7590c98ffb04442d983bb36a8818c)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>


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

Branch: refs/heads/branch-0.8
Commit: bce9d24794f8137e7b15c47af8b20ea02f06bebe
Parents: 7856e88
Author: oxygen311 <alex39-09@mail.ru>
Authored: Tue Aug 14 12:03:50 2018 +0200
Committer: Jeff Zhang <zjffdu@apache.org>
Committed: Tue Sep 18 08:28:31 2018 +0800

----------------------------------------------------------------------
 docs/interpreter/sap.md | 47 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/bce9d247/docs/interpreter/sap.md
----------------------------------------------------------------------
diff --git a/docs/interpreter/sap.md b/docs/interpreter/sap.md
index 0447958..5a19297 100644
--- a/docs/interpreter/sap.md
+++ b/docs/interpreter/sap.md
@@ -121,3 +121,50 @@ where
 
   and [Folder1].[Dimension5] in ('Value1', 'Value2');
 ```
+
+### `distinct` keyword
+You can write keyword `distinct` after keyword `select` to return only distinct (different)
values.
+
+Example query
+```sql
+%sap
+universe [Universe Name];
+
+select distinct
+  [Folder1].[Dimension2], [Measure1]
+where
+  [Filter1];
+```
+
+### `limit` keyword
+You can write keyword `limit` and limit value in the end of query to limit the number of
records returned based on a limit value.
+
+Example query
+```sql
+%sap
+universe [Universe Name];
+
+select
+  [Folder1].[Dimension2], [Measure1]
+where
+  [Filter1]
+limit 100;
+```
+
+## Object Interpolation
+The SAP interpreter also supports interpolation of `ZeppelinContext` objects into the paragraph
text.
+To enable this feature set `universe.interpolation` to `true`. The following example shows
one use of this facility:
+
+####In Scala cell:
+
+```scala
+z.put("curr_date", "2018-01-01 00:00:00")
+```
+
+####In later SAP cell:
+
+```sql
+where
+   [Filter1]
+   and [Date] > '{curr_date}'
+```


Mime
View raw message