Found 142 repositories(showing 30)
asatrya
This is a simple ETL using Airflow. First, we fetch data from API (extract). Then, we drop unused columns, convert to CSV, and validate (transform). Finally, we load the transformed data to database (load).
ultranet1
Project Description: A music streaming company wants to introduce more automation and monitoring to their data warehouse ETL pipelines and they have come to the conclusion that the best tool to achieve this is Apache Airflow. As their Data Engineer, I was tasked to create a reusable production-grade data pipeline that incorporates data quality checks and allows for easy backfills. Several analysts and Data Scientists rely on the output generated by this pipeline and it is expected that the pipeline runs daily on a schedule by pulling new data from the source and store the results to the destination. Data Description: The source data resides in S3 and needs to be processed in a data warehouse in Amazon Redshift. The source datasets consist of JSON logs that tell about user activity in the application and JSON metadata about the songs the users listen to. Data Pipeline design: At a high-level the pipeline does the following tasks. Extract data from multiple S3 locations. Load the data into Redshift cluster. Transform the data into a star schema. Perform data validation and data quality checks. Calculate the most played songs for the specified time interval. Load the result back into S3. dag Structure of the Airflow DAG Design Goals: Based on the requirements of our data consumers, our pipeline is required to adhere to the following guidelines: The DAG should not have any dependencies on past runs. On failure, the task is retried for 3 times. Retries happen every 5 minutes. Catchup is turned off. Do not email on retry. Pipeline Implementation: Apache Airflow is a Python framework for programmatically creating workflows in DAGs, e.g. ETL processes, generating reports, and retraining models on a daily basis. The Airflow UI automatically parses our DAG and creates a natural representation for the movement and transformation of data. A DAG simply is a collection of all the tasks you want to run, organized in a way that reflects their relationships and dependencies. A DAG describes how you want to carry out your workflow, and Operators determine what actually gets done. By default, airflow comes with some simple built-in operators like PythonOperator, BashOperator, DummyOperator etc., however, airflow lets you extend the features of a BaseOperator and create custom operators. For this project, I developed several custom operators. operators The description of each of these operators follows: StageToRedshiftOperator: Stages data to a specific redshift cluster from a specified S3 location. Operator uses templated fields to handle partitioned S3 locations. LoadFactOperator: Loads data to the given fact table by running the provided sql statement. Supports delete-insert and append style loads. LoadDimensionOperator: Loads data to the given dimension table by running the provided sql statement. Supports delete-insert and append style loads. SubDagOperator: Two or more operators can be grouped into one task using the SubDagOperator. Here, I am grouping the tasks of checking if the given table has rows and then run a series of data quality sql commands. HasRowsOperator: Data quality check to ensure that the specified table has rows. DataQualityOperator: Performs data quality checks by running sql statements to validate the data. SongPopularityOperator: Calculates the top ten most popular songs for a given interval. The interval is dictated by the DAG schedule. UnloadToS3Operator: Stores the analysis result back to the given S3 location. Code for each of these operators is located in the plugins/operators directory. Pipeline Schedule and Data Partitioning: The events data residing on S3 is partitioned by year (2018) and month (11). Our task is to incrementally load the event json files, and run it through the entire pipeline to calculate song popularity and store the result back into S3. In this manner, we can obtain the top songs per day in an automated fashion using the pipeline. Please note, this is a trivial analyis, but you can imagine other complex queries that follow similar structure. S3 Input events data: s3://<bucket>/log_data/2018/11/ 2018-11-01-events.json 2018-11-02-events.json 2018-11-03-events.json .. 2018-11-28-events.json 2018-11-29-events.json 2018-11-30-events.json S3 Output song popularity data: s3://skuchkula-topsongs/ songpopularity_2018-11-01 songpopularity_2018-11-02 songpopularity_2018-11-03 ... songpopularity_2018-11-28 songpopularity_2018-11-29 songpopularity_2018-11-30 The DAG can be configured by giving it some default_args which specify the start_date, end_date and other design choices which I have mentioned above. default_args = { 'owner': 'shravan', 'start_date': datetime(2018, 11, 1), 'end_date': datetime(2018, 11, 30), 'depends_on_past': False, 'email_on_retry': False, 'retries': 3, 'retry_delay': timedelta(minutes=5), 'catchup_by_default': False, 'provide_context': True, } How to run this project? Step 1: Create AWS Redshift Cluster using either the console or through the notebook provided in create-redshift-cluster Run the notebook to create AWS Redshift Cluster. Make a note of: DWN_ENDPOINT :: dwhcluster.c4m4dhrmsdov.us-west-2.redshift.amazonaws.com DWH_ROLE_ARN :: arn:aws:iam::506140549518:role/dwhRole Step 2: Start Apache Airflow Run docker-compose up from the directory containing docker-compose.yml. Ensure that you have mapped the volume to point to the location where you have your DAGs. NOTE: You can find details of how to manage Apache Airflow on mac here: https://gist.github.com/shravan-kuchkula/a3f357ff34cf5e3b862f3132fb599cf3 start_airflow Step 3: Configure Apache Airflow Hooks On the left is the S3 connection. The Login and password are the IAM user's access key and secret key that you created. Basically, by using these credentials, we are able to read data from S3. On the right is the redshift connection. These values can be easily gathered from your Redshift cluster connections Step 4: Execute the create-tables-dag This dag will create the staging, fact and dimension tables. The reason we need to trigger this manually is because, we want to keep this out of main dag. Normally, creation of tables can be handled by just triggering a script. But for the sake of illustration, I created a DAG for this and had Airflow trigger the DAG. You can turn off the DAG once it is completed. After running this DAG, you should see all the tables created in the AWS Redshift. Step 5: Turn on the load_and_transform_data_in_redshift dag As the execution start date is 2018-11-1 with a schedule interval @daily and the execution end date is 2018-11-30, Airflow will automatically trigger and schedule the dag runs once per day for 30 times. Shown below are the 30 DAG runs ranging from start_date till end_date, that are trigged by airflow once per day. schedule
sevkw
A project that runs a simple ETL orchestrated by Airflow on local machine and AWS EC2.
stemitom
A simple pipeline infrastructure with ETL pipeline contained in a Docker environment on Apache Airflow for orchestration and Postgres for data warehousing
A demo for creating a simple data warehouse ETL pipeline on AWS with Airflow
k0rsakov
https://www.notion.so/korsak0v/Data-Engineer-185c62fdf79345eb9da9928356884ea0
anekpattanakij
No description available
mkmasudrana806
Building a simple data pipeline using PySpark and Apache Airflow with PostgreSQL database. ETL with Airflow Orchestration
This is a simple project that brings automation and showcase one of the most predominant job of a Data Engineer -- DATA REPLICATION using an ETL/EtLT approach with python and orchestrated with Airflow.
patharanordev
Simple Extract/Transform/Load(ETL) for COVID-19 data by using Airflow
rendybjunior
Simple etl scheduler using airflow as engine
marodeur100
Simple ETL Example build for a Kubernetes & Airflow Demo
InventN
simple ETL project using airflow, data from MSSQL to postgres
lucky-upay
Using postgreSQL,python and airflow designed a simple etl pipelines
VadapavKahaanHai
Simple ETL Pipeline using Airflow DAG Scheduling to Load Cute Meow Facts Directly From API
HariDataEngineer
Build a simple ETL pipeline with the best open source orchestration tool Airflow from scrath
Sumiya-ii
Simple ETL pipeline creating PM2.5 air quality data dashboard using OpenAQ API, Docker, Airflow, PostgreSQL, and AWS S3.
gurgo22
Simple ETL pipeline orchastrated with Airflow for loading crypto coin prices with an API into a BigQuery data warehouse
Using a simple Apache airflow image on docker with this repository, create an environment for Databricks with orchestration and ETL.
quangliz
A simple project that implements a scalable batch ETL (Extract, Transform, Load) pipeline using Apache Airflow for orchestration, Apache Spark for data processing, PostgreSQL for structured data storage, and Apache Cassandra for scalable raw data storage.
caesarmario
End-to-end Weather ETL built with Apache Airflow, MinIO, and PostgreSQL. Extract Open-Meteo hourly data → normalize to Parquet → load to L1/L2 tables with idempotent, backfillable DAGs, simple data checks, and SQL-only transformations.
Develop-Packt
In this module, you will look at creating a pipeline by breaking down a job into multiple executable stages. You will implement a simple linear pipeline and then move further by implementing a multi-stage data pipeline, then automate the multi-stage pipeline using Bash. Further to this you will improve the efficiency by running the pipeline as an asynchronous process using the ETL workflow and then create DAG for the pipeline and implement it using Airflow.
Syedhashirayub
The goal of this project is to create a simple ETL pipeline using Airflow and OpenWeather API. In this pipeline, we will extract data from OpenWeather API, transform it, and load it into an AWS S3 bucket using s3fs.
Nicckks
Este projeto implementa uma automação diária utilizando Apache Airflow para coletar a cotação do dólar (USD → BRL), salvar os dados em CSV, armazenar em um banco SQLite e registrar uma notificação final. É um pipeline simples, mas completo, ideal para estudos de orquestração e ETL.
chaba-victor
This project uses Apache Airflow to extract weather data from an API, transform the data, and load it into an S3 bucket.
lmnindzja
Airflow simple ETL
AzlieJohari57
simple airflow ETL
wandaarma
No description available
CaoKha
No description available
truongthanhvu2337
No description available