Create a cloud storage bucket
Upload CSV files to Cloud Storage
Create a Cloud SQL instance
Create a database
Introduction to SQL for BigQuery and Cloud SQL
SQL (Structured Query Language) is a standard language for data operations that allows you to ask questions and get insights from structured datasets. It's commonly used in database management and allows you to perform tasks like transaction record writing into relational databases and petabyte-scale data analysis.
This lab serves as an introduction to SQL and is intended to prepare you for the many labs and quests in Qwiklabs on data science topics. This lab is divided into two parts: in the first half, you will learn fundamental SQL querying keywords, which you will run in the BigQuery console on a public dataset that contains information on London bikeshares.
In the second half, you will learn how to export subsets of the London bikeshare dataset into CSV files, which you will then upload to Cloud SQL. From there you will learn how to use Cloud SQL to create and manage databases and tables. Towards the end, you will get hands-on practice with additional SQL keywords that manipulate and edit data.
In this lab, you will learn how to:
- Distinguish databases from tables and projects.
- Use the
WHEREkeywords to construct simple queries.
- Identify the different components and hierarchies within the BigQuery console.
- Load databases and tables into BigQuery.
- Execute simple queries on tables.
- Learn about the
- Execute and chain the above commands to pull meaningful data from datasets.
- Export a subset of data into a CSV file and store that file into a new Cloud Storage bucket.
- Create a new Cloud SQL instance and load your exported CSV file as a new table.
INSERT INTO, and
UNIONqueries in Cloud SQL.
Very Important: Before starting this lab, log out of your personal or corporate gmail account.
This is a introductory level lab. This assumes little to no prior experience with SQL. Familiarity with Cloud Storage and Cloud Shell is recommended, but not required. This lab will teach you the basics of reading and writing queries in SQL, which you will apply by using BigQuery and Cloud SQL.
Before taking this lab, consider your proficiency in SQL. Below are more challenging labs that will let you apply your knowledge to more advanced use cases:
Once you're ready, scroll down and follow the steps below to get your lab environment set up.
Join Qwiklabs to read the rest of this lab...and more!
- Get temporary access to the Google Cloud Console.
- Over 200 labs from beginner to advanced levels.
- Bite-sized so you can learn at your own pace.