2. Table of Contents
• What is Google BigQuery?
• BigQuery is a database
• BigQuery is a cloud data warehouse
• BigQuery is a columnar database
• BigQuery is a spreadsheet database
• Why you should use BigQuery
• BigQuery setup guide
• Create a BigQuery project
• What is a BigQuery sandbox
3. Table of Contents
• How to use Google BigQuery
• Create a data set in BigQuery
• File formats you can import into BigQuery
• Upload CSV data to BigQuery
• Import data from Google Sheets to BigQuery manually
• Import data to BigQuery from Google Sheets and other software on
a schedule
• Query tables in BigQuery
• How to query data in BigQuery + syntax example
• Query settings
• How to save queries in BigQuery
• How to schedule queries in BigQuery
• Query history
4. Table of Contents
• Export queries from BigQuery manually and
automatically
• BigQuery exporting limits
• Example of exporting query from BigQuery
• Export queries from BigQuery to Google Sheets
automatically
• How BigQuery stores data
• BigQuery architecture
7. BigQuery setup guide
• You don’t have to install any software. Google
handles the infrastructure, and you just need to set
up BigQuery, which is quite easy.
• Need to login to Google Cloud Platform with valid
Gmail id and create cloud account.
• After that, go to BigQuery – you can use either the
search bar or find it manually in the left menu.
8. Create a BigQuery
project
• Click the Create Project button to spin the
prop. Name your project, choose organization
if needed, and click Create
9. What is a
BigQuery
sandbox
• SANDBOX means that you’re using a
sandbox account, which does not require
you to enter payment information. This
free tier option grants you 10 GB of
active storage and 1 TB of processed
query data per month. Using this
account, your tables will expire in 60
days.
• Or you’ll get $300 of cloud credits
free.
10. How to use Google
BigQuery
• Create a data set in BigQuery
Let’s add some data into BigQuery to check out
how it works. Click the project you want, and
then Create Dataset.
11. • Assign a Dataset ID – you can enter letters and numbers. If
needed, you can select the Data location as well as a table
expiration (up to 60 days) and encryption. After that,
click Create dataset.
• A new dataset is now created. You can find it by clicking
the Expand node button next to your project name.
• The next step is to create a table in the dataset. Here is
the button to click:
12. • You have a few options here:
• Create an empty table and fill it manually
• Upload a table from your device in one of the supported formats
(explained in the next section)
• Import a table from Google Cloud Storage or Google Drive (this
option allows you to import Google Sheets)
• Import a table from Google Cloud Bigtable through the CLI
13. File formats you can import into BigQuery
You can easily load your tabular data into BigQuery in the
following formats:
• CSV
• JSONL (JSON lines)
• Avro
• Parquet
• ORC
• Google Sheets (for Google Drive only)
• Cloud Datastore Backup (for Google Cloud Storage only)
14. Upload CSV data to BigQuery
Once you click the Create table button, you need to complete the following steps:
1.Choose source – Upload
2.Select file – click Browse and choose the CSV file from your device
3.File format – choose CSV, but usually, the system auto-detects the file format
4.Table name – enter the table name
5.Check the Auto detect checkbox
6.Click Create table
Additionally, you can define partition settings (to divide your table
into smaller segments), cluster settings (to organize data based on the
contents of specified columns), as well as configure the Advanced
options.
15. Import data from Google Sheets to BigQuery manually
Click the Create table button and:
1.Choose source – Drive
2.Select Drive URI – insert the URL of your Google Sheets
spreadsheet
3.File format – choose Google Sheets
4.Sheet range – specify the sheet and data range to import. If you
leave this field blank, BigQuery will retrieve the data from the
first sheet of your spreadsheet.
5.Table name – enter the table name
6.Mark the Auto detect checkbox
7.Click Create table
16. You may be interested in setting
up Advanced options since they let you:
Skip rows with the column values that do
not match the schema.
Skip a specific number of rows from the
top.
Enable including newlines contained in
quoted data sections.
Enable accepting rows that are missing
trailing optional columns.
Select an encryption key management
solution.
17. • Once you click Create table, the specified
sheet from your spreadsheet will be imported
into BigQuery. Here are the details (table
preview is not available for importing Google
Sheets):
18. How to query data in
BigQuery + syntax
example
• Click the Query table button to start
querying.