Is it possible to filter an array?

Hi, i’m currently trying Dremio and i would like to make like a spark filter.
Sorry if my question is stupid but i didn’t find what i’m searching in the doc.

I have a column containing :

[
  {"key1": "cats", "key2": "adopted", "name": xxx },
  {"key1": "dogs", "key2": "to adopted", "name": xxxx},
  ....
]

In spark sql i can do something like that :
filter(column, item -> item.key1== "cats")[0] as cat

It will return the first map with key1 == cats, (i use it in the select part).

Is their a similar dremio function without using flatten ?

Thank you for your help :slight_smile:

@Julienqw Is your source a Hive table?

Hi @balaji.ramaswamy , no it’s a parquet file.

@Julienqw Here are the different things you can do with the MAP

Ok thank you, so it’s not possible to do it in only one function.
We have to flatten our array and then filter it.