I just discovered that flatten removes entries with null value in the flattened field. How do you get around this?
I have a dataset in MongoDB where one of the fields is an array. It is perfectly valid for this array to be null. When I flatten the field in Dremio, all records with no value for the array disappear.
I found a previous post in which the answer was that this was the designed behavior. There has to be a way around this.
I guess I could do a select flatten(field) as field from table where field is not null UNION all select field from table where field is null … But I hope there’s a better way