Repository: drill Updated Branches: refs/heads/gh-pages 0120d252a -> c77a3122d
upper to lowercase png, DRILL-3134 Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e45f60c3 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e45f60c3 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e45f60c3 Branch: refs/heads/gh-pages Commit: e45f60c33b8cf0660a485e7ab924078269e0361c Parents: 0120d25 Author: Kristine Hahn <[email protected]> Authored: Wed May 20 10:05:06 2015 -0700 Committer: Kristine Hahn <[email protected]> Committed: Wed May 20 10:05:06 2015 -0700 ---------------------------------------------------------------------- .../050-json-data-model.md | 2 +- _docs/img/execution-tree.PNG | Bin 13849 -> 16724 bytes .../data-types/010-supported-data-types.md | 10 +++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/e45f60c3/_docs/data-sources-and-file-formats/050-json-data-model.md ---------------------------------------------------------------------- diff --git a/_docs/data-sources-and-file-formats/050-json-data-model.md b/_docs/data-sources-and-file-formats/050-json-data-model.md index a793dbf..183ea17 100644 --- a/_docs/data-sources-and-file-formats/050-json-data-model.md +++ b/_docs/data-sources-and-file-formats/050-json-data-model.md @@ -56,7 +56,7 @@ When you set this option, Drill reads all numbers from the JSON files as DOUBLE. * Cast JSON values to [SQL types]({{ site.baseurl }}/docs/json-data-model/#data-type-mapping), such as BIGINT, FLOAT, and INTEGER. * Cast JSON strings to [Drill Date/Time Data Type Formats]({{ site.baseurl }}/docs/date-time-and-timestamp). -Drill uses [map and array data types]({{ site.baseurl }}/docs/handling-different-data-types/#handling-json-and-parquet-data) internally for reading complex and nested data structures from JSON. You can cast data in a map or array of data to return a value from the structure, as shown in [âCreate a view on a MapR-DB tableâ] ({{ site.baseurl }}/docs/lesson-2-run-queries-with-ansi-sql/#create-a-view-on-a-mapr-db-table). [âQuery Complex Dataâ]({{ site.baseurl }}/docs/querying-complex-data-introduction) shows how to access nested arrays. +Drill uses [map and array data types]({{ site.baseurl }}/docs/handling-different-data-types/#handling-json-and-parquet-data) internally for reading complex and nested data structures from data sources such as JSON. You can cast data in a map or array of data to return a value from the structure, as shown in [âCreate a view on a MapR-DB tableâ] ({{ site.baseurl }}/docs/lesson-2-run-queries-with-ansi-sql/#create-a-view-on-a-mapr-db-table). [âQuery Complex Dataâ]({{ site.baseurl }}/docs/querying-complex-data-introduction) shows how to access nested arrays. ## Reading JSON To read JSON data using Drill, use a [file system storage plugin]({{ site.baseurl }}/docs/file-system-storage-plugin/) that defines the JSON format. You can use the `dfs` storage plugin, which includes the definition. http://git-wip-us.apache.org/repos/asf/drill/blob/e45f60c3/_docs/img/execution-tree.PNG ---------------------------------------------------------------------- diff --git a/_docs/img/execution-tree.PNG b/_docs/img/execution-tree.PNG index 9fb8026..18e7cc4 100755 Binary files a/_docs/img/execution-tree.PNG and b/_docs/img/execution-tree.PNG differ http://git-wip-us.apache.org/repos/asf/drill/blob/e45f60c3/_docs/sql-reference/data-types/010-supported-data-types.md ---------------------------------------------------------------------- diff --git a/_docs/sql-reference/data-types/010-supported-data-types.md b/_docs/sql-reference/data-types/010-supported-data-types.md index c3f7ff8..17fcedb 100644 --- a/_docs/sql-reference/data-types/010-supported-data-types.md +++ b/_docs/sql-reference/data-types/010-supported-data-types.md @@ -44,11 +44,15 @@ To enable the DECIMAL type, set the `planner.enable_decimal_data_type` option to Drill supports the following composite types: * Array - Array element references, for example `a[1]` is the primary type-specific operation. * Map - Drill supports constructs in the form `m['k']` -For more information about array and map types, see the section, ["Handling Different Data Types"]({{site.baseurl}}/docs/handling-different-data-types/#handling-json-and-parquet-data), [KVGEN]({{site.baseurl}}/docs/kvgen/), and [FLATTEN]({{site.baseurl}}/docs/flatten/). +In this release of Drill, you cannot reference a composite type by name in a query, but Drill supports array values coming from data sources. For example, you can use the index syntax to query data and get the value of an array element. + +`a[1]` + +Drill uses [map and array data types]({{ site.baseurl }}/docs/handling-different-data-types/#handling-json-and-parquet-data) internally for reading complex and nested data structures from data sources such as JSON. You can cast data in a map or array of data to return a value from the structure, as shown in [âCreate a view on a MapR-DB tableâ] ({{ site.baseurl }}/docs/lesson-2-run-queries-with-ansi-sql/#create-a-view-on-a-mapr-db-table). [âQuery Complex Dataâ]({{ site.baseurl }}/docs/querying-complex-data-introduction) shows how to access nested arrays. + +For more information about using array and map types, see the sections, [KVGEN]({{site.baseurl}}/docs/kvgen/), and [FLATTEN]({{site.baseurl}}/docs/flatten/). ## Casting and Converting Data Types
