Skip to content
Advertisement

BigQuery – Best way to DROP date-sharded tables

I have a few date-sharded tables I want to delete but they already have more than 100 shards for each table and can’t drop them manually.

I’ve tried using wildcards

JavaScript

but it does not seem to work.

I finally used the python API:

JavaScript

And it works, but I needed to create the tables array with the names of the tables I wanted to drop.

Is there a way to DROP all date-shards of a date-sharded table in BigQuery form the UI?

Or using an SQL command in the UI?

Or using the command line with a wildcard?

Thanks

Advertisement

Answer

And what about instead of creating the tables array (with the names of the tables) you use…

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement