drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tshi...@apache.org
Subject [01/50] [abbrv] drill git commit: DRILL-2854
Date Fri, 01 May 2015 18:07:57 GMT
Repository: drill
Updated Branches:
  refs/heads/gh-pages 8887d8a32 -> 6ed707ba1


DRILL-2854


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

Branch: refs/heads/gh-pages
Commit: e3856b4c89ae33ff20c0e6c97bd5a3e0ac2a2bc1
Parents: b92fcc6
Author: Kristine Hahn <khahn@maprtech.com>
Authored: Wed Apr 29 14:00:26 2015 -0700
Committer: Kristine Hahn <khahn@maprtech.com>
Committed: Wed Apr 29 14:00:26 2015 -0700

----------------------------------------------------------------------
 .../nested-data-functions/020-kvgen.md           | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/e3856b4c/_docs/sql-reference/nested-data-functions/020-kvgen.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/nested-data-functions/020-kvgen.md b/_docs/sql-reference/nested-data-functions/020-kvgen.md
index 249d211..1e01b16 100644
--- a/_docs/sql-reference/nested-data-functions/020-kvgen.md
+++ b/_docs/sql-reference/nested-data-functions/020-kvgen.md
@@ -76,16 +76,21 @@ keys or constrain the keys in some way. For example, you can use the
 [FLATTEN]({{ site.baseurl }}/docs/flatten-function) function to break the
 array down into multiple distinct rows and further query those rows.
 
-For example, assume that a JSON file contains this data:  
+For example, assume that a JSON file named `simplemaps.json` contains this data:  
 
-    {"a": "valA", "b": "valB"}
-    {"c": "valC", "d": "valD"}
-  
+	{"rec1":{"a": "valA", "b": "valB"}}
+	{"rec1":{"c": "valC", "d": "valD"}}
 
-KVGEN would operate on this data to generate:
+KVGEN would operate on this data as follows:
 
-    [{"key": "a", "value": "valA"}, {"key": "b", "value": "valB"}]
-    [{"key": "c", "value": "valC"}, {"key": "d", "value": "valD"}]
+	SELECT KVGEN(rec1) FROM `simplemaps.json`;
+	+------------+
+	|   EXPR$0   |
+	+------------+
+	| [{"key":"a","value":"valA"},{"key":"b","value":"valB"}] |
+	| [{"key":"c","value":"valC"},{"key":"d","value":"valD"}] |
+	+------------+
+	2 rows selected (0.201 seconds)
 
 Applying the [FLATTEN]({{ site.baseurl }}/docs/flatten-function) function to
 this data would return:


Mime
View raw message