You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Alex (JIRA)" <ji...@apache.org> on 2016/01/12 10:50:41 UTC
[jira] [Created] (DRILL-4265) KVGEN should be able to select an
entire data row
Alex created DRILL-4265:
---------------------------
Summary: KVGEN should be able to select an entire data row
Key: DRILL-4265
URL: https://issues.apache.org/jira/browse/DRILL-4265
Project: Apache Drill
Issue Type: New Feature
Components: Functions - Drill
Reporter: Alex
If -for example- we have a json data file like the following...
{code:javascript}
{
"0.0.1":{
"version":"0.0.1",
"date_created":"2014-03-15"
},
"0.1.2":{
"version":"0.1.2",
"date_created":"2014-05-21"
}
}
{code}
... where you can see it contains just one object which is a map in which each key is the version number and the value is a new map with version and date_created properties.
If we want to use Apache Drill to get a list with two columns: version and date_created, there is no way we can do this currently.
Something like this below does not work:
{code:sql}
SELECT KVGEN(t.*) FROM dfs.`D:/drill/sample-data/myjsonfile.json` AS t;
{code}
So how do you tell KVGEN to process the WHOLE ROW since the row object is the actual map we want to convert?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)