Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

check if all elements in hive array contain a pattern

Highlighted

check if all elements in hive array contain a pattern

New Contributor

Hello hortonworks family!

I have two columns in a hive table that look something like this:

codecodeset
ABAB123,MU124
LMLM123,LM234

I need to verify that all elements in codeset column contain the value in code column so in the above example the first row would be false and the second row would be true.

Is there a simple way to do this that I am missing? I already read about array_contains but that returns true if just one element matches, I need all elements to contain what's in the code column.

Thanks in advance.

Don't have an account?
Coming from Hortonworks? Activate your account here