The hive Apache table has the following column definition:
myvars:array<struct<index:bigint,value:string>>
An example for the relevant data:
"myvars":[
{"index":2,"value":"value1"}
, {"index":1,"value":"value2"}
, {"index":2,"value":"value3"}
]
How can this array be filtered for all elements where "index" == 2.
In JavaScript, I would do something like the following:
myvars.filter(function(d){return d.index==2;})
How can I achieve the same result with Apache Hive QL, preferably without side views?
source
share