Is there a convenient way to use the ARRAY_CONTAINS function in the hive to search for multiple records in an array column, and not just one? Therefore, and not:
WHERE ARRAY_CONTAINS(array, val1) OR ARRAY_CONTAINS(array, val2)
I would like to write:
WHERE ARRAY_CONTAINS(array, val1, val2)
The complete problem is that I need to dynamically read val1both val2from the command line arguments when I run the script and I don’t know at all how many values will be configured. Thus, you may think that valsis a comma separated list (or array) that contains the values of val1, val2, ...and I want to write
WHERE ARRAY_CONTAINS(array, vals)
Thanks in advance!
source
share