Santhoshhadoop
Santhoshhadoop

Reputation: 53

Parse json string to search for a particular key from Phoenix table

I am trying to access a table created through Phoenix from Hbase. The value for a REQUEST column is JSON string and I want to write a phoenix query to search for a particular key e.g. "merchant" from it and as a result want its distinct value back and total count.

How can I do this using Phoenix query?

ColumnName                        Value

KEY                          ABC-123
CODE                         123
REQUEST                      {"notification":{"source":"ABC","device":"Android"},"template":{"job":"Real","merchant":"ABC"}}

Expected Output: merchant count(*) ABC 1

Upvotes: 1

Views: 63

Answers (0)

Related Questions