Bulk operations
Copy, clone, move, drop or truncate many tables at once. Pick a project, dataset or table, choose an action, filter by name. Querylab.io writes the SQL into a new tab and you decide whether to run it.
Every action produces a script in a new query tab named after it (Drop 12 tables). Nothing runs until you press Run.
Opening it
- Right-click a project, dataset or table in the schema tree → Bulk Generate. The target step is skipped.
- ⌘ K → Generate queries, then search for a target.
There is no multi-select in the tree: the set of tables is the target plus a name filter.
The three steps
- Select Target: a project, dataset or table. Search covers all three.
- Select Action: one of the five above.
- Filter: a pattern matched against table names under the target.
*matches anything,?one character; a pattern with neither is treated as a substring (backup=*backup*). Empty matches everything. The footer shows Preview: 14 tables match as you type; Enter generates.
What you get
-- Clone 3 tables from `ace-analytics.warehouse` | Filter: dim_* -- Lightweight zero-copy clone (shares storage with source) -- Placeholders selected - type to replace all. Or: select <target_dataset>, Ctrl+Shift+L CREATE TABLE `<target_dataset>.dim_customer` CLONE `ace-analytics.warehouse.dim_customer`; CREATE TABLE `<target_dataset>.dim_product` CLONE `ace-analytics.warehouse.dim_product`; CREATE TABLE `<target_dataset>.dim_date` CLONE `ace-analytics.warehouse.dim_date`;
Copy Tables writes a CREATE TABLE … COPY … per table: a full copy, billed as storage. Clone Tables writes CREATE TABLE … CLONE …: zero-copy, you pay only for what diverges. Move Tables produces two blocks, the copies and then the DROP TABLE statements; BigQuery can’t wrap DDL in a transaction, so run the first block, verify, then run the second. Drop Tables writes DROP TABLE IF EXISTS … and Truncate Tables writes TRUNCATE TABLE …; neither asks for confirmation beyond running the tab.
For Copy, Clone and Move the tab opens with every <target_dataset> placeholder already selected as a multi-cursor: type once and all of them change. If you lose the selection, select one placeholder and press ⌘⇧L (CtrlShiftL on Windows and Linux).
Checking before you move or drop
To find out whether two tables actually differ before you move or drop, see Data compare. Per-table CREATE TABLE DDL for a single table is in its details tab, not here.