I want to create a RECORD as the outcome of a select in BigQuery standard SQL.
If I run this SQL snippet,
WITH
mock_data AS (
SELECT 'foo1' as foo, 'bar1' as bar, 'bla1' as bla UNION ALL
SELECT 'foo2' as foo, 'bar2' as bar, 'bla2' as bla
)
SELECT
*,
STRUCT(
m.foo as foo,
m.bar as bar
) as foobar
FROM mock_data m
the output of foobar is an array of records, not a single record. 
How could I have the foobar column be a single record and not an array of records?
Thanks a lot in advance!



