
Explore ETL with Python to move data from MySQL to BigQuery, detailing extract, transform, load steps, tool options, and practical setup for analysts and engineers.
Install Python across Linux, Mac, and Windows by checking with python -V, using python.org downloads or Homebrew, and running brew install python to obtain the latest version.
Learn to set up and manage python virtual environments across Windows, macOS, and Linux, using Anaconda on Windows and Real Python guides to install Python versions with activation and deactivation.
Set up a Google Cloud account to explore Google Cloud Platform services, including BigQuery, while understanding the free $300 credits and the 100 TB monthly query allowance.
Navigate the Google Cloud console to set up a BigQuery project, create a dataset and tables, preview data, and run a sample query filtering year 2011.
Learn to install the Google Cloud SDK to enable Python-based ETL workflows from MySQL to BigQuery, including downloading, configuring your environment, and initializing with gcloud init.
Authenticate your Python ETL to Google Cloud by running gcloud auth application-default login, granting access to your Google account, and using the saved credential files to connect to BigQuery.
Please note, connection properties have been updated:
host: 82.197.82.63
username: u479841347_user
password: LearnSQL123
database: u479841347_sql_course
port: 3306
Set up a Python ETL environment by creating and using a virtual environment, then install pandas, numpy, mysql-connector, Google Cloud, and PyArrow for MySQL to BigQuery workflows.
Explore the etl process: extract data from MySQL, transform it with sql or Python (Pandas), and load the transformed dataset into BigQuery, with notes on elt and when transformations occur.
Please note, connection properties have been updated:
host: 82.197.82.63
username: u479841347_user
password: LearnSQL123
database: u479841347_sql_course
port: 3306
Query a MySQL database using Python by establishing a connection, creating a cursor, and executing a select statement; display year, title, and genre from IMDb movies.
Stage data extracted from mysql using pandas to support the etl process. Explore pandas capabilities for tabular visualization, deriving new fields, and reading from csv, json, and databases during transformation.
Explore how pandas reads SQL data into a dataframe, inspects dtypes, and ensures correct data type handling for ETL from MySQL to BigQuery.
Discover Pandas filters to segment data like SQL where clauses, filtering for years such as 2005 or 2006 and using not to refine subsets.
Export a pandas dataframe to csv using df.to_csv with a defined path and index off, and organize the output in a data files directory.
Derive a new movie rating field in SQL by labeling average votes as bad, okay, or good, using pandas during the extract step of the ETL workflow.
Apply a Python function in pandas to derive a new column from duration, creating watchability classifications and enriching your data during ETL from MySQL to BigQuery.
Utilize pandas to transform city house prices into a date city price time-series by pivoting with stack and index reset, producing a clean city housing dataset.
Navigate the BigQuery console to create a table with SQL, drop and create the table, insert two rows, and preview results, while recognizing slower inserts.
Create a new BigQuery table by uploading a file, auto-detect the schema, and preview 1800 movie records (year integer, title string, genre string, average vote float).
Installs the Google Cloud BigQuery module, connects to BigQuery with Python, authenticates using gcloud, runs a sample SQL query on the movie dataset, and prints the results.
Learn to load a CSV city housing file into BigQuery with a Python client, configure a load job with CSV format and auto-detect, and verify row counts.
Explore how BigQuery load jobs use the write disposition to control data behavior. Choose write, append, or truncate to overwrite or append to existing data, with write empty signaling duplicates.
execute a complete etl program in Python that extracts from MySQL, transforms with a custom year rating function, and loads into BigQuery as an annual movie summary.
Bypass the local extract by running ETL in memory with Python, moving data from MySQL to BigQuery via a data frame instead of CSV, with auto detect and truncate.
Develop your technical skills in etl with Python while balancing business understanding and relationship building, and rate the course or explore other free resources on git and sql.
This is a direct and to the point course that will get you quickly ETL'ing data from MySQL to BigQuery.
The lessons in this course are broken out into short How-Tos. Therefore you can take this course over the weekend and be ready to show off your skills on Monday morning!
Things that we will cover:
Setup
Setting up a GCP Account
Credential and Authentication for security
Python Environment Setup
Extract
Use Python to connect to MySQL
Use Python's pandas to export data
Python library usage for saving files to file paths
Transform
Use Python functions to transform data
Use Python pandas to transform data
Use inline SQL during Extract for data transformation
Load
Use the BigQuery Python library
Connect to BigQuery
Load data to BigQuery
Incremental Loads vs Truncate and Load
Other data handling options during Load
After taking this course, you'll be comfortable with the following pretty cool things:
Connect to MySQL using Python
Learn how to obscure your database credentials so you're not exposing them in your code
Usage of the os module for the purpose of saving files and hard coding fewer things.
Use both Python and the pandas library to transform data on the fly during the Transformation phase of your ETL
Learn how to use GBQ's modules/libraries to make the loading of the data a very easy, straightforward task
Have fun, enjoy and keep growing!