Skip to content

Instantly share code, notes, and snippets.

@MatthewDaniels
MatthewDaniels / delete-all-the-tables.sh
Last active November 5, 2023 04:48
Delete all the tables within a Dataset in BigQuery using the bq command line utility.
#!/bin/bash
# VARS
PROJECT=my-project
DATASET_NAME=Datisan_TEST
# tables will have the structure day_tables_prefix_yyyyMMdd (sharded daily tables)
TABLE_PREFIX=day_tables_prefix
# make sure we are on the right project