BigQuery select * except nested column
<p>What I want to do should be simple: Given a BigQuery schema, I want to select all tables (including nested ones) apart from a few. The tricky thing is that BigQuery has a nested structure and the few I want to exclude are nested within other records.</p>

<p>I've found the SELECT * except clause in the <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select-modifiers" rel="noreferrer">BigQuery documentation</a> which seems very promising. The problem is that it doesn't seem to support the nested structure exclusion.</p>

<p>For example, using the public github_nested dataset we can write a query like</p>

<pre><code>#standardSQL
SELECT * except (payload) FROM `bigquery-public-data.samples.github_nested` LIMIT 1000
</code></pre>

<p>This does what we expect successfully by removing the payload record from the results. Let's imagine now that we only want to remove payload.comment, thereby preserving the rest of the payload record contents in the response. I tried</p>

<pre><code>#standardSQL
SELECT * except (payload.comment) FROM `bigquery-public-data.samples.github_nested` LIMIT 1000
</code></pre>

<p>However, this fails.</p>

<p>Anyone know of a way to accomplish this?</p>

<p>Thanks!</p>