I am trying to insert into a BigQuery table that has a struct.
The struct is very large and I am only inserting one field.
I used the DML statement below:
INSERT INTO `my-project.my-dataset.sesh_20200101` (trafficSource)
VALUES (STRUCT('campaign_123058182' AS campaign))
I get the query error
Value has type STRUCT
<campaign STRING>
which cannot be inserted into column trafficSource, which has type STRUCT<referralPath STRING, campaign STRING, source STRING, ...>
at [2:9]
Is there a way to have the missing (non-specified) remaining fields of the trafficSource
struct be filled with null without typing them all out in the query?
I saw some other question like this but it was done in Go. I would like to do it in SQL DML if possible.