rat-nick/film-data-ingestion-pipeline
حول
A repository defining a simple data pipleine for ETL jobs relating to media metadata.
البيانات والتحليلاتالنمو المقاس للنجوم
- خلال 24 ساعة
- +١
- خلال 7 أيام
- +١
- خلال 15 يومًا
- +١
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلFilm Data Ingestion Pipeline
This project is designed to fetch, process, and store film metadata from The Movie Database (TMDB) using Apache Airflow. The pipeline consists of several components including data fetching, processing, and loading into a PostgreSQL database.
Project Structure
dags/: Contains the Airflow DAGs.weekly_film_discovery_dag.py: Defines the DAG for discovering and processing films on a weekly basis.
dags/utils/: Contains utility scripts.films.py: Contains functions to fetch film data and genres from TMDB.
docker-compose.yaml: Docker Compose configuration to set up the Airflow and PostgreSQL services.schema.sql: SQL schema for the database containing the production data.
Getting Started
Prerequisites
- Docker
- Docker Compose
- TMDB API key
Setup
Clone the repository:
git clone https://github.com/yourusername/film-data-ingestion-pipeline.git cd film-data-ingestion-pipelineCreate a
.envand run the following commands:touch .env echo "TMDB_API_KEY=<your_api_key_here>" >> .env echo "AIRFLOW_UID=50000" >> .env echo "AIRFLOW_GID=0" >> .envStart the services using Docker Compose:
docker-compose up -dAccess the Airflow webserver at
http://localhost:8080and log in with the default credentials (airflow/airflow).Add a new connection from the Admin tab. You should use the following parameters:
Parameter Value Connection Id media-metadata-dbConnection Type Postgres Host media-dbSchema mediaLogin mediaPassword mediaPort 5432
Of course, you could use a DBaaS like neon, but the free tier is limited for the data that will be ingested. Just don't forget to change the connection parameters.
- Enable the
weekly_film_discoveryDAG and voila!
Usage
The pipeline is scheduled to run weekly and will:
- Fetch film data from TMDB.
- Process and save the data to a temporary file.
- Load the data into the PostgreSQL database.
- Clean up temporary files.
Extra
If you wish to explore the media database, the port on the host is 15432
Disclaimer
- This project uses the TMDB API but is not endorsed or certified by TMDB.
- TMDB data is used in compliance with their Terms of Use.
- This project is for personal and educational purposes only and does not redistribute or resell TMDB data.
For more information, visit TMDB's official website.
License
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…