Is there a convenient way (Python, web UI, or CLI) for inserting a new column into an existing BigQuery table (that already has 100 columns or so) and update the schema accordingly?
Say I want to insert it after column 49. If I do this via a query, I will have to type every single column name, will I not?
Update: the suggested answer does not make it clear how this applies to BigQuery. Furthermore, the documentation does not seem to cover
ALTER TABLE `tablename` ADD `column_name1` TEXT NOT NULL AFTER `column_name2`;
Syntax. A test confirmed that the AFTER
identifier does not work for BigQuery.
SELECT * FROM ...
without manually adjusting order of column or you have more complex scenario to support? – Yun ZhangSELECT * EXCEPT (cols_after), new col, cols after
at least reduces the number of col names to type. – Fabian Bosler