You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Kristine Hahn (JIRA)" <ji...@apache.org> on 2015/04/29 23:05:06 UTC

[jira] [Resolved] (DRILL-2854) KVGEN function document needs to be corrected

     [ https://issues.apache.org/jira/browse/DRILL-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristine Hahn resolved DRILL-2854.
----------------------------------
    Resolution: Fixed

Thanks, Khurram. Corrected the preliminary GA docs: http://tshiran.github.io/drill/docs/kvgen/ The Confluence site you looked at is being replaced by the docs on the preliminary site soon (days), so we are not updating the old Confluence version.

> KVGEN function document needs to be corrected
> ---------------------------------------------
>
>                 Key: DRILL-2854
>                 URL: https://issues.apache.org/jira/browse/DRILL-2854
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 0.9.0
>            Reporter: Khurram Faraaz
>            Assignee: Kristine Hahn
>
> The sample JSON data snippet here (http://drill.apache.org/docs/kvgen/) needs to be corrected and additionally the SQL query to produce the output listed in that section, can be added to that section.
> Here is the correct representation of the data in the JSON data file. Currently the text on documentation page is missing the "rec1" identifier, and the opening and closing braces for "rec1" are also missing.
> {code}
> [root@centos-01 bin]# hadoop fs -cat /tmp/simplemaps.json
> {"rec1":{"a": "valA", "b": "valB"}}
> {"rec1":{"c": "valC", "d": "valD"}}
> {code}
> Query that produces the desired output, like the one mentioned in the documentation section for KVGEN function.
> {code}
> 0: jdbc:drill:> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)