create a table with a column type RECORD

后端 未结 2 1544
长情又很酷
长情又很酷 2020-12-12 01:20

I\'m using big query and i want to create a job which populates a table with a \"record\" type columns. The data will be populated by a query - so how can i write a query wh

2条回答
  •  轮回少年
    2020-12-12 01:22

    You need to use the dot notation to reflect the output as a RECORD example query:

    select 
      'florida' as country.state, 
      'SFO' as country.city;
    

    In this example country is the record and state|city are fields in the record.

提交回复
热议问题