I found the explanation how to undelete a table using the API. But how to do with web UI?
Asked
Active
Viewed 341 times
1
-
1You can run a `SELECT *` query over the old snapshot with a destination table specified, but this will not be a free operation (where as the table copy using the `bq` client is). – Elliott Brossard Sep 18 '17 at 18:01
-
That does not work. I get: Not found table_xyz – Ilja Sep 18 '17 at 18:51
-
obviously it does not work with table itself as it is deleted - the "trick" is in using table with snapshot at a time when it existed. btw. this approach has limitation - I think table should be deleted not more than 2 weeks ago for it to be "recovered" – Mikhail Berlyant Sep 18 '17 at 19:01
-
@ElliottBrossard How do you run a SELECT * over a snapshot? What does that command look like? – Praxiteles Mar 13 '18 at 22:42
-
Use a snapshot decorator as a suffix of the table name in the FROM clause. https://cloud.google.com/bigquery/table-decorators#snapshot_decorators – Elliott Brossard Mar 13 '18 at 23:49
1 Answers
2
Just to clarify - referenced post uses bq command line tool (rather than API)
"BigQuery Web UI" does not allow you set Source when you do a copy table - only Destination! Source is assumed to be a table that you originated Copy from - but as it is deleted - it is not available in Navigator - thus not doable!
Meantime, the "Web UI" I can suggest to reproduce this approach is to use respective API Explorer - in this case you should deal with Jobs.Insert with copy in configuration - https://developers.google.com/apis-explorer/#p/bigquery/v2/bigquery.jobs.insert
This UI allows you "visually" build and execute any Google API In particular, here you can set both Source and Destination so you should be good to go!

Mikhail Berlyant
- 165,386
- 8
- 154
- 230