Giter Site home page Giter Site logo

ads-etl's Introduction

ads-etl

What does it do?

This repo serves as an example of an ETL pipeline that uses PostgresSQL database and Airflow scheduler. The sample data is included inside dags/app directory. The ETL job extracts data from the csv file, process and then load the respective tables into PostgresSQL.

Schema Design

The below star schema shows how the data is broken into 5 different tables. Each dimension table is linked to the fact table by their foreign keys. The extra serial primary key is created for the ad search and ad click table.

Installation

Docker is needed to run this repo. Airflow installation through docker-compose.yaml could be found from Marvin's guide and the Airflow's webiste.

To install the image, simply run docker-compose up -d inside the working directory. Package requirements could be specified in the requirement.txt file. For this app, we don't really need any external packages installed.

Once the installation is finished, you could log into your localhost database with port 5434 by using the following credential. They could also be found in the .env file.

POSTGRES_USER=airflow
POSTGRES_PASSWORD=airflow
POSTGRES_DB=airflow

Navigate to your web browser and enter http://localhost:8080 to access Airflow UI. The username and the password is airflow.

You should see an etl_dag as in the picture. Trigger the dag to start the ETL pipeline. After the dag is finished, navigate to your PostgresSQL database and look for a schema name etl. This schema should contain all of the tables.

ads-etl's People

Contributors

tuthang102 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.