Code Monkey home page Code Monkey logo

chicago-taxi's Introduction

Chicago Taxi data ingestion project

This project builds a data pipeline for loading the Chicago taxi trips dataset into BigQuery for subsequent analysis.

Project Steps:

  1. Terraform: Create a bucket in GCP and a dataset in BigQuery.
  2. AirFlow: Pipeline for loading data into the bucket and subsequently creating an external table in BigQuery.
  3. dbt: Create models for use in subsequent analysis.

Terraform docs

Before Running Terraform

You need to:

  • configure a service account in GCP
  • install Google Cloud SDK
  • authenticate in GCP
  • install Terraform

To create the infrastructure, run the following script:

bash run_terraform.sh

Check what it is going to do and press yes.

To destroy the created infrastructure run:

bash destroy_terraform.sh

Airflow docs

Before Running the Docker Container with Airflow

You need to place the Google credentials in the ~/.google/credentials/ directory on your machine (either local or VM).

cd ~ && mkdir -p ~/.google/credentials/
mv <path/to/your/service-account-authkey>.json ~/.google/credentials/google_credentials.json

Before running the container, remember to update:

  • the GCP_PROJECT_ID and GCP_GCS_BUCKET variable values in the .env file
  • the DOWNLOAD_START_DATE, DOWNLOAD_END_DATE, BIGQUERY_DATASET, TABLE_ID variable values in dag__data_ingestion.py

Execution:

  1. Run the following command to build an image, initialize Airflow, and kick up all services:
bash run_airflow.sh
  1. Login to Airflow web UI on localhost:8080 with default credentials admin/admin and run DAG named dag__data_ingestion

  2. To shutdown all Airflow services run:

bash shutdown_airflow.sh

dbt docs

Before running models please install dbt-core or set up dbt cloud. For more details, refer to the official documentation

Commands to run dbt models:

dbt seed
dbt build

Models overview:

Models overview

chicago-taxi's People

Contributors

zherebin 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.