You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Kalyan (JIRA)" <ji...@apache.org> on 2016/08/01 13:54:20 UTC
[jira] [Commented] (PHOENIX-2084) Support loading json data using
apache phoenix flume plugin
[ https://issues.apache.org/jira/browse/PHOENIX-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15402064#comment-15402064 ]
Kalyan commented on PHOENIX-2084:
---------------------------------
as per previous comments .. i updated the code .
now code will work with array data type also.
Please verify the patch .. i included the test cases also.
https://github.com/kalyanhadooptraining/phoenix/commit/fd9cbf36dc814fbce087626c8fff909222fbe6f9
It supports array data type also with proper `jsonpath`
Note:
// mandatory properties
phoenix-agent.sinks.phoenixsink.serializer = json
phoenix-agent.sinks.phoenixsink.serializer.columns=c1,c2,c3,c4
// optional properties with sample data
phoenix-agent.sinks.phoenixsink.serializer.partialSchema = true
// {"c1":"kalyan", "c2":1, "c3":2012, "c4":"phoenix"}
phoenix-agent.sinks.phoenixsink.serializer.columnsMapping = {"c1":"c1",
"c2":"c2", "c3":"c3", "c4":"c4"}
// {"f1":"kalyan", "f2":1, "f3":2012, "f4":"phoenix"}
phoenix-agent.sinks.phoenixsink.serializer.columnsMapping = {"c1":"f1",
"c2":"f2", "c3":"f3", "c4":"f4"}
// {"c1":"kalyan", "c2":1, "a": {"b":2012}, "x":{"y":"phoenix"}}
phoenix-agent.sinks.phoenixsink.serializer.columnsMapping = {"c1":"c1",
"c2":"c2", "c3":"a.b", "c4":"x.y"}
// {"c1":"kalyan", "c2":1, "a": {"b":2012}, "x":{"y": [{"z" : "phoenix"}, {"z" : "flume"}] }}
phoenix-agent.sinks.phoenixsink.serializer.columnsMapping = {"c1":"c1",
"c2":"c2", "c3":"a.b", "c4":"x.y[*].z"}
any suggestions .. please update me.
> Support loading json data using apache phoenix flume plugin
> -----------------------------------------------------------
>
> Key: PHOENIX-2084
> URL: https://issues.apache.org/jira/browse/PHOENIX-2084
> Project: Phoenix
> Issue Type: New Feature
> Environment: cloudera 5.4
> Reporter: venakt rao sirikonda
> Assignee: venakt rao sirikonda
> Fix For: 4.9.0
>
>
> We should support loading JSON data through our flume plugin as flume as support for this data shape.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)