Skip to content
Advertisement

Remove nulls from an array in SQL

Want to remove nulls from an array in hive/sql

for example : array is [‘1’,null] after converting to string values it should be ‘1’ only.

to split the array I am using below:

Thanks for the help!

Advertisement

Answer

Use regexp_replace to remove null from concatenated string:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement