O'Reilly logo

Learning Google BigQuery by Eric Brown, Thirukkumaran Haridass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Querying data in a partition table

For this demo, a public dataset by the name of nyc-tlc will be used. You can locate this dataset under Public Datasets, as shown in the following screenshot. This demo will show you how to create partition tables for existing data in other tables and how to query the table.

Run the following commands to extract 5 days of data from the trips_2015 table to the daily tables. Replace the destination dataset name and table name as per your project.

This command loads 2015-Mar-30 data into the trips_20150330 table in the PartitionTaxiTables dataset:

bq query --destination_table PartitionTaxiTables.trips_20150330 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required