How to filter the value of a map in an array hive <map <string, string >>

I have a column with an array of types in my hive table and I want to find the value on the map. eg:

test.class  |  test.value   |
class1|[{"person":"p1","city":"c1"},{"person":"p2","city":"c2"},
{"person":"p3","city":"c3"}]|
class2|[{"person":"p3","city":"c3"},{"person":"p4","city":"c3"}]| 

1. I want to find something in the table, like classes that have a person from c2. (as shown above) how can I do this?

2. I have another question; Can I use the hive as a base database for the data warehouse and just convert all the data from all applications to the hive? or should you use hbase before using the bush and create all the databases in the nosql database before integration?

0
source share

Source: https://habr.com/ru/post/1612269/


All Articles