更新时间:2022-11-02 23:18:07
要为NULLABLE字段提供具有空值的行,只需从您要插入的行中省略该字段即可.对于第二个示例,REPEATED字段(或SQL术语为ARRAY)不能具有null元素.要为NULLABLE STRING数组建模,可以使用REPEATED RECORD,该记录包含一个名为value
的STRING字段,或者在SQL术语中等效为ARRAY<STRUCT<value STRING>>
.
To provide a row with a null value for a NULLABLE field, simply omit the field from the row that you are inserting. For your second example, a REPEATED field (or an ARRAY in SQL terms) cannot have a null element. To model an array of NULLABLE STRING, you can use a REPEATED RECORD that contains a STRING field named value
, for instance, or equivalently an ARRAY<STRUCT<value STRING>>
in SQL terms.