
Learn to build production-ready ETL pipelines in Python with pandas, from extraction to load, using GitHub, Docker, and Argo Workflows or Apache Airflow in a production environment.
Extract Deutsche Boerse public data from s3 buckets and generate a weekly parquet report with opening, closing, minimum, maximum prices, daily volume, and change from previous close.
Understand the production environment for Python ETL pipelines: from GitHub code and configuration to Docker images, secrets, and orchestration with Airflow or Argo, deploying data to S3.
Build a production-ready ETL pipeline in Python with pandas, starting from virtual environments and a Jupyter exploration to a tested, dockerized, well-structured design embracing functional and object-oriented patterns.
Switch between projects by using separate virtual environments that isolate python versions and packages. Learn tools like venv, virtualenv, pyenv, and pipenv to manage these environments.
Set up a Python virtual environment on Windows using the latest Python version, locate installations, create a project folder, and install pandas within the new environment.
Register for an AWS account, create an IAM user with programmatic access, attach S3 full access, download credentials, configure environment variables, install the AWS CLI, and access the public dataset.
Read multiple files quickly by iterating over S3 bucket objects in a notebook, decoding keys, and building a Pandas data frame with selected columns while handling missing data.
Transform raw data to opening and closing prices per ICN and date, using group by and transform to create start price, min, max, and daily traded volume; compute previous-close change.
Learn to pass a date argument to a pandas etl workflow, convert a string to datetime, compute the previous day, and filter s3 data by date for targeted reporting.
Quick and dirty guide to saving a report to S3 by creating a unique bucket, configuring access, and uploading the data frame using a buffer.
Make ETL scripts production-ready by parameterizing inputs, refactoring loops into Pythonic functions, and using list comprehensions to efficiently extract, transform, and load data from source to target.
Adopt a solid code design to keep ETL pipelines readable and maintainable from development to production. Emphasize self-documenting structure and software principles to help teammates understand and extend the code.
Explore functional programming and object oriented programming for building production-ready ETL pipelines in Python / Pandas, comparing modular small functions with object oriented design using encapsulation, abstraction, inheritance, and polymorphism.
Explore why testing matters for data pipelines, comparing no tests, manual tests, and automated tests, and show how unit, integration, system, and acceptance tests prevent regression.
Explore a four-layer layout architecture—infrastructure, adapter, application, and main layers. The domain layer holds entities and domain events, while infrastructure stores databases and caches.
Restructure an ETL workflow in Python by turning ad-hoc code into pure, testable functions, building adapter layer for S3 storage, and implementing extract, transform, and load steps with Pandas.
Restructure a Python etl from ad-hoc steps to a functional pipeline with extract, transform, load, a main entry point, and explicit source and target buckets, objects, and data frames.
learn to decouple date listing from file extraction in a weekly etl job, returning a date list and corresponding files with a boto3-like prefix filter.
Restructure the get objects function by generating a date list and, for each date, retrieving files via a prefix-filtered list, using the adapter and application layers.
Explore essential object-oriented design principles, including composition over inheritance, encapsulation, dependency inversion and inversion of control, SOLID, DRY, and YAGNI, to craft decoupled, maintainable Python ETL code.
Implement configuration-driven ETL pipelines with robust logging using YAML config and the Surprise Logging library, and design resilient exception handling and a single orchestration entry point.
Develop a metadata workflow for ETL pipelines in Python. Compute a return_date_list and demonstrate uploading a meter file to an AWS S3 bucket with a data frame workflow.
Implement a dateless return_date_list function in Python for ETL pipelines, reading metadata and using a try/except block to handle missing metadata, returning unprocessed dates from Monday to today.
Add a function to update the meta file after a job run by concatenating new extract date lists with old data and writing the result to S3 as CSV.
Design a robust ETL workflow with object-oriented class design, single responsibility principles, and an interface for S3 bucket connectors, using a common function approach and a meta process.
Compare functional programming and object oriented approaches for ETL jobs and data pipelines, noting their respective strengths. Prefer object oriented programming for better encapsulation, extensibility, and reuse in larger projects.
Set up a GitHub repository, clone it locally, create a develop branch, install dependencies from the Pipfile and Pipfile.lock in a virtual environment, then commit and push.
Select Visual Studio Code, download the Windows version, open your working directory, launch it with code from the command line, and install extensions like the patent extension for development.
Set up the class frame by scaffolding etl components with empty methods, and create a constants file with enum file types and meta process formats, plus a sedra transform ui.
Develop a python as3 bucket connector class with an init method, using typing hints and docstrings, and configure a session with endpoint url and environment-based credentials.
Set up a solution meta process class using static methods for function-like usage, with empty placeholders, and organize the meta process file in a common module with documentation.
Create and organize constants in a common folder by defining two enum-backed classes with class attributes for history file types and metadata formats, mirroring the meter and street processes.
Set up a class frame for solution custom_exceptions in the common folder; there is nothing to code yet, just prepare for custom exceptions by outlining and creating them as needed.
Set up and configure the Sedra transformer module in a Python ETL workflow, defining source and target configs, three-bucket connectors, and core extract-transform-load steps.
Establishes the entry point in the main directory using a main function and the if __name__ == '__main__' pattern, currently left empty for solution run.
Learn how to replace print statements with the standard Python logging module, using levels, handlers, and JSON or YAML config to create flexible, production-ready pipelines.
Install and configure Python's built-in logging to power ETL workflows, using a YAML-based config, formatters, and a console handler. Build a root logger with dictConfig for flexible, production-ready logs.
Set up PYTHONPATH to import your modules from anywhere in the system, add project folders to sys.path via an environment variable, and compare regular versus namespace packages with __init__.py.
Master clean Python coding by applying the Zen of Python and style guidelines, and use dry, kiss, and Pythonic features like dunder methods, context managers, decorators, and comprehensions with linting.
Implement the list_files_in_prefix method in the as tree bucket connector, detailing input cases (prefix string, existing or missing) and outputs, exception behavior, and logging considerations.
Implement the list_files_in_prefix method in the Bacquet Connecter class to list s3 bucket files by a given prefix, returning the file names whose keys contain that prefix.
Explore linting, a tool that analyzes Python code to flag errors and style issues, and learn how git hooks and continuous integration keep ETL pipelines clean.
Install Pylint in a virtual environment, enable it in VS Code settings, configure fatal errors and warnings, and run linting on save to catch trailing whitespace.
Learn automated unit testing with the built-in unittest framework, including setup and teardown, test collections, and strive for 100 percent coverage using patch and moto.
Define a unit test specification for list_files_in_prefix, detailing two cases: existing prefix in the bucket yields two file names, and non-existing prefix yields an empty list.
Explore unit test implementation for list files with a prefix, validating expected results, keys, and cleanup, while debugging tests and measuring coverage with unit tests and coverage.
Implement all etl methods for the s3 bucket connector, including read/write to data frames, meta processing, extract transform load and report, and unit tests toward full coverage.
implement read_csv_to_df solution by mirroring the notebook approach, with added logger info about reading the file using the endpoint name and key, and using an instance variable for the bucket.
Learn to implement a unit test for read_csv_to_df in a pandas ETL workflow, including building expected results, validating dataframe shape and values, and verifying log messages via a context manager.
Implement write_df_to_s3 to return 1 for empty data frame, reuse CCSVI path, and use a helper for proxy files to avoid duplication, while raising wrong format exception for unsupported formats.
Develop four unit tests for write_df_to_s3, validating empty data frames, correct data frame uploads to s3, proper cleanup, and handling of a wrong format via an exception.
Implement update_meta_file by validating with a new data frame and format values, handling missing meter files, and raising wrong meter file or wrong format exceptions on column mismatches.
Unit test implementation for update_meta_file in a production-ready Python pandas ETL pipeline; tests cover no meta file, empty date list, lock handling, valid and invalid meta content, and exception handling.
Implement the return_date_list solution in Python by using the notebook’s code with minor refinements and removing hard coded values, emphasizing a straightforward, nearly identical approach.
Develop unit tests for the return_date_list method across four scenarios: no meta file, valid meta file, invalid meta file, and empty date list; verify expected date outputs and error handling.
Enhance the extract method with logger messages for started and finished states, return an empty data frame when no facts exist, and initialize date lists for meta processing.
Enable unit testing of the extract method by setting up a test environment with source and target configurations, mocking dates, and validating empty and populated data frames.
Implement a guard clause in the transform_report1 to return an empty data frame when input is empty, preventing all transformations; refine notebook code with comments and Lowgar infos.
Develop unit tests for transform_report1 in a pandas etl workflow, validating an empty input dataframe yields an empty result and a valid input produces the expected dataframe report via assertions.
Refine the load method by cleaning notebook code, adding comments and logging. Build an update list with a list comprehension to extract dates.
Implement a unit test for the load component in a pandas ETL pipeline, using a single test case, patch objects, and checks on data frame and meta file outputs.
Remove arguments and the extract date list; now we execute the __init__ method of the retail class, and apart from that, everything remains the same.
Demonstrates unit test implementation for an etl report, validating the data frame and metadata, performing cleanup, and achieving 100 percent test coverage across all modules with 21 tests.
Learn to write and run integration tests for ETL pipelines in Python, validating how modules interact with real interfaces without mocks, while reusing suitable unit tests.
Outline a test specification for integration tests, including test name and description, then create a three-source packet with bucket connector test incidents and verify a pakhi file as output.
Demonstrates implementing an integration test by configuring source and target buckets, adapting a unit test to integration testing, handling environment variables, and using setup and teardown to manage resources.
Launch the entrypoint run.py with the config path, create s3 bucket connectors for source and target, and run the sedra etl job while checking logs.
Explain Python dependency management using requirements files and version pinning to achieve deterministic builds, manage sub-dependencies, and use pip with separate production and development environments.
Learn to implement pipenv for production-ready environments by using the Pipfile and Pipfile.lock to pin exact package versions. Create separate production and development environments and reproduce the setup with ignore-pipfile.
discover python profiling tools to analyze performance and memory, including cProfile, profile, line profiler, and memory profiler. learn to time snippets with the time module and visualize memory over time.
Install memory profile and matplotlib, add profile decorator to methods, run and plot results to identify hot spots and timing bottlenecks for focused optimization.
Create a docker image for the etl app by writing a dockerfile with python 3.9 slim, set environment variables, disable pip cache and bytecode, copy files, install dependencies, build.
Run a production ETL job with Argo workflows and a container image to load source data into the target three buckets, mounting secrets and config maps as needed.
Transform a notebook solution into production-ready ETL pipelines in Python with Pandas via object-oriented design, clean coding, unit testing, and profiling, deployed through an orchestration tool with Visual Studio Code.
This course will show each step to write an ETL pipeline in Python from scratch to production using the necessary tools such as Python 3.9, Jupyter Notebook, Git and Github, Visual Studio Code, Docker and Docker Hub and the Python packages Pandas, boto3, pyyaml, awscli, jupyter, pylint, moto, coverage and the memory-profiler.
Two different approaches how to code in the Data Engineering field will be introduced and applied - functional and object oriented programming.
Best practices in developing Python code will be introduced and applied:
design principles
clean coding
virtual environments
project/folder setup
configuration
logging
exeption handling
linting
dependency management
performance tuning with profiling
unit testing
integration testing
dockerization
What is the goal of this course?
In the course we are going to use the Xetra dataset. Xetra stands for Exchange Electronic Trading and it is the trading platform of the Deutsche Börse Group. This dataset is derived near-time on a minute-by-minute basis from Deutsche Börse’s trading system and saved in an AWS S3 bucket available to the public for free.
The ETL Pipeline we are going to create will extract the Xetra dataset from the AWS S3 source bucket on a scheduled basis, create a report using transformations and load the transformed data to another AWS S3 target bucket.
The pipeline will be written in a way that it can be deployed easily to almost any production environment that can handle containerized applications. The production environment we are going to write the ETL pipeline for consists of a GitHub Code repository, a DockerHub Image Repository, an execution platform such as Kubernetes and an Orchestration tool such as the container-native Kubernetes workflow engine Argo Workflows or Apache Airflow.
So what can you expect in the course?
You will receive primarily practical interactive lessons where you have to code and implement the pipeline and theory lessons when needed. Furthermore you will get the python code for each lesson in the course material, the whole project on GitHub and the ready to use docker image with the application code on Docker Hub.
There will be power point slides for download for each theoretical lesson and useful links for each topic and step where you find more information and can even dive deeper.