Data Engineering Course for Beginners

Short Summary:
This course provides a beginner-friendly introduction to data engineering, focusing on building a robust and scalable data pipeline. Key technologies covered include databases (PostgreSQL, MySQL), Docker for containerization, and analytical engineering tools like Airflow and dbt. The course demonstrates building a pipeline from scratch, progressing from a basic Python script to a more sophisticated system leveraging open-source tools. The high demand and lucrative compensation for data engineers are highlighted, emphasizing the importance of reliable data infrastructure in the success of big data projects (cited failure rate of 85-87%). The course details processes like containerization with Docker, SQL querying, and data pipeline construction using Airflow and dbt.
Detailed Summary:
The course is structured as a step-by-step guide to data engineering, using a hands-on approach with practical examples and demonstrations.
Section 1: Introduction to Data Engineering and its Importance
The instructor, Justin Chow, introduces the field of data engineering and highlights its growing importance due to the high failure rate of big data projects (85-87% failure rate cited). He emphasizes the role of data engineers in building reliable data infrastructure, addressing issues like unreliable data infrastructures, incorrect data modeling, and redundant work. The high earning potential (US median salary of $90,000-$150,000/year) is also mentioned as a motivator for pursuing this career path. The crucial role of data engineers in enabling data-driven decisions, particularly in the AI/ML space, is stressed.
Section 2: Introduction to Docker
This section provides a comprehensive introduction to Docker, explaining its use in simplifying the process of building, shipping, and running applications within containers. The benefits of containers (lightweight, portable, self-sufficient) are discussed. The three core concepts of Docker (Dockerfiles, Docker images, and Docker containers) are explained in detail, along with a practical demonstration of containerizing a simple to-do application. The instructor guides viewers through installing Docker, creating a Dockerfile, building an image, running a container, and managing persistent data using volumes. The use of Docker Compose for managing multi-container applications is also introduced and demonstrated.
Section 3: Introduction to SQL
This section covers the fundamentals of SQL (Structured Query Language), demonstrating its use for database creation and manipulation. A PostgreSQL database is set up within a Docker container, and viewers are guided through creating tables, inserting data, and performing various SQL queries (SELECT, DISTINCT, UPDATE, INSERT, LIMIT, aggregate functions (COUNT, SUM, AVG, MAX, MIN), GROUP BY, JOINs (INNER JOIN, LEFT JOIN), UNION, UNION ALL, and subqueries).
Section 4: Building a Data Pipeline (Python Script)
The course moves on to building a basic Extract, Load, Transform (ELT) pipeline using a Python script. Two PostgreSQL databases (source and destination) are set up using Docker Compose. The Python script uses the subprocess
module to execute pg_dump
and psql
commands to transfer data between the databases. The instructor demonstrates the process, including troubleshooting common issues encountered during development.
Section 5: Automating the Pipeline with a Cron Job
A cron job is added to automate the execution of the ELT script. This involves modifying the Dockerfile to include cron and creating a bash script (start.sh
) to manage the cron daemon and schedule the script's execution.
Section 6: Integrating dbt for Data Transformation
The course introduces dbt (data build tool), an open-source tool for writing custom data transformations. The instructor guides viewers through installing dbt, initializing a project, and creating custom models (SQL files) to transform data within the destination database. The use of macros for reusable SQL components and Jinja templating for dynamic SQL queries are also demonstrated.
Section 7: Orchestration with Airflow
Airflow, an open-source workflow management platform, is integrated to orchestrate the ELT process and dbt transformations. A new Docker Compose setup is created to include Airflow, its metadata database, and the necessary services. A DAG (Directed Acyclic Graph) is created in Python to define the workflow, using Airflow operators to manage the execution of the ELT script and dbt. Troubleshooting steps are shown to resolve issues encountered during integration.
Section 8: Data Integration with Airbyte
Finally, Airbyte, an open-source data integration tool, is integrated to replace the manual ELT script. The instructor demonstrates setting up Airbyte connections between the source and destination PostgreSQL databases, creating a connector, and configuring the sync settings. The Airbyte connector is then integrated into the Airflow DAG, demonstrating the orchestration of the entire pipeline using Airbyte, Airflow, and dbt. The final pipeline successfully moves data from the source to the destination, applies transformations using dbt, and is fully orchestrated by Airflow.