BigQuery Events Table Schema - Mode change from repeated to nullable

Hey,

I have a pipeline setup on GCP and I was just wondering if there was a way to change bq columns mode from REPEATED to NULLABLE.

All the context columns created by mutator are in REPEATED mode. I wanted to change this.

image

Thank you!

Why do you want to change this?

The context_ columns are repeated records by design (as this is an array so can contain more than one object / value).

Hi @mike,

For our design, a few of the context_columns will have just one row, just like the unstruct_event column. Just wanted to know if there was a way to make them nullable.

Thank you!

There’s no way to change this in the source table itself (without risking breaking something). If you only ever expect certain contexts_* columns to contain one row the easiest way is to have this in your downstream data model - using something like SAFE_OFFSET(0).

1 Like