Can not set NOT NULL to column with type ARRAY

445 views Asked by At

I have a Table with column of type:

ARRAY<STRING(36)>

All data have a value, but i can not set NOT NULL.

ALTER TABLE Organizations ALTER COLUMN superfinUsersList ARRAY<STRING(36)> NOT NULL

error: Cannot add NOT NULL to column Organizations.superfinUsersList
2

There are 2 answers

0
Dan McGrath On

Unfortunately this functionality for Arrays is not currently supported, so the error message is correct, and documentation will be updated to reflect this.

0
Robson Araujo On

This is now possible, you just need to make sure all your rows have some value for that column. Unfortunately the array itself can still contain null elements.