Create empty string array BigQuery

Viewed 2339

I need to create an empty array, typed as < STRING > ARRAY

I need to append( UNION ) some real data, and some mocked data to reproduce not generated values.

My real data contains a struct of 2 string arrays. In my mocked data I tried to mock the empty array with the "[]" operator. But the union fails, because I cannot UNION a STRUCT of INT64 ARRAYS with a STRUCT of STRING ARRAYS.

Tried :

STRUCT([] AS ART,[] AS LIB)

Which succeed to generate a struct of empty INT64 ARRAYS. But leads to :

Error :

Column 4 in UNION ALL has incompatible types: STRUCT<ART ARRAY<STRING>, LIB ARRAY<STRING>>, STRUCT<ART ARRAY<INT64>, LIB ARRAY<INT64>> at [86:2]
1 Answers
Related