user374374
user374374

Reputation: 343

BigQuery Partition table

How to create BigQuery Partition table in Bigquery WebUI. I know we can create from gcloud and api. I searched webUI but couldn't find any option for creating partition table from WebUI.

Thanks,

Upvotes: 1

Views: 276

Answers (2)

Gigi Grin
Gigi Grin

Reputation: 21

you can do it with SQL in the editor, for example, a table is partitioned by range on the id column the partitions are created using the GENERATE_ARRAY function, which generates an array of values from 1 to 100 with a step size of 10

CREATE TABLE `yourDatasetId.yourNewTableId` (
                `id` INT64 NOT NULL,
                `name` STRING(255),
                `created_at` TIMESTAMP NOT NULL
)
PARTITION BY RANGE_BUCKET(id, GENERATE_ARRAY(1, 100, 10))

to create a BQ table with just UI by right click on the 3 dots next to the dataset name

and a link to the Google Docs

https://cloud.google.com/bigquery/docs/creating-partitioned-tables#create_an_empty_partitioned_table

Upvotes: 1

Pavan Edara
Pavan Edara

Reputation: 2315

We added support for this recently and expect the UI to show it once the changes are deployed. I will provide an update once that is done. Thanks!

Upvotes: 1

Related Questions