{"id":26187090,"url":"https://github.com/bdbao/etl-randuser","last_synced_at":"2026-04-14T01:32:02.165Z","repository":{"id":281195353,"uuid":"944491057","full_name":"bdbao/etl-randuser","owner":"bdbao","description":"An end-to-end data engineering pipeline that orchestrates data ingestion, processing, and storage using Apache Airflow, Python, Apache Kafka, Apache Zookeeper, Apache Spark, and Cassandra.","archived":false,"fork":false,"pushed_at":"2025-03-07T13:42:37.000Z","size":307,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T10:28:52.713Z","etag":null,"topics":["apache-airflow","apache-kafka","apache-spark","api","cassandra","data-streaming","docker-compose","postgresql","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdbao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-07T12:45:26.000Z","updated_at":"2025-03-18T01:46:40.000Z","dependencies_parsed_at":"2025-03-07T14:43:56.586Z","dependency_job_id":null,"html_url":"https://github.com/bdbao/etl-randuser","commit_stats":null,"previous_names":["bdbao/etl-randuser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bdbao/etl-randuser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbao%2Fetl-randuser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbao%2Fetl-randuser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbao%2Fetl-randuser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbao%2Fetl-randuser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdbao","download_url":"https://codeload.github.com/bdbao/etl-randuser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbao%2Fetl-randuser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31778580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T00:11:49.126Z","status":"ssl_error","status_checked_at":"2026-04-14T00:10:29.837Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-airflow","apache-kafka","apache-spark","api","cassandra","data-streaming","docker-compose","postgresql","python"],"created_at":"2025-03-11T23:36:40.065Z","updated_at":"2026-04-14T01:32:02.113Z","avatar_url":"https://github.com/bdbao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# End-to-End Realtime Data Streaming Project\n\n## Table of Contents\n- [End-to-End Realtime Data Streaming Project](#end-to-end-realtime-data-streaming-project)\n  - [Table of Contents](#table-of-contents)\n  - [Introduction](#introduction)\n  - [System Architecture](#system-architecture)\n  - [Technologies](#technologies)\n  - [Getting Started](#getting-started)\n\n## Introduction\n\nThis project serves as a comprehensive guide to building an end-to-end data engineering pipeline. It covers each stage from data ingestion to processing and finally to storage, utilizing a robust tech stack that includes Apache Airflow, Python, Apache Kafka, Apache Zookeeper, Apache Spark, and Cassandra. Everything is containerized using Docker for ease of deployment and scalability.\n\n\u003c!-- # Ref: https://www.youtube.com/watch?app=desktop\u0026v=GqAcTrqKcrY, https://github.com/airscholar/e2e-data-engineering --\u003e\n\n## System Architecture\n\n![System Architecture](img/architecture.png)\n\nThe project is designed with the following components:\n\n- **Data Source**: We use `randomuser.me` API to generate random user data for our pipeline.\n- **Apache Airflow**: Responsible for orchestrating the pipeline and storing fetched data in a PostgreSQL database.\n- **Apache Kafka and Zookeeper**: Used for streaming data from PostgreSQL to the processing engine.\n- **Control Center and Schema Registry**: Helps in monitoring and schema management of our Kafka streams.\n- **Apache Spark**: For data processing with its master and worker nodes.\n- **Cassandra**: Where the processed data will be stored.\n\n## Technologies\n\n- Apache Airflow\n- Python\n- Apache Kafka\n- Apache Zookeeper\n- Apache Spark\n- Cassandra\n- PostgreSQL\n- Docker\n- DataGrip\n\n## Getting Started\n\n```bash\ngit clone https://github.com/bdbao/etl-randuser.git\ncd etl-randuser\n\nchmod +x scripts/entrypoint.sh\ndocker compose up -d\n```\n- Run DAG in **Airflow UI** (http://localhost:8080, username/pw is `admin`). Waiting until the Scheduler ready to run.\n- View Kafka Consumer:\n  ```bash\n  docker exec -it broker kafka-console-consumer --bootstrap-server broker:29092 --topic users_created --from-beginning\n  ```\n```bash\nspark-submit --version # e.g: show version 2.12.18-3.5.4. \n# Then edit .config(...) of create_spark_connection() in spark_stream.py\n\npip install cassandra-driver # (if not installed)\nspark-submit --master local[2] --packages com.datastax.spark:spark-cassandra-connector_2.12:3.5.1,org.apache.spark:spark-sql-kafka-0-10_2.12:3.5.1,org.apache.kafka:kafka-clients:3.5.1 scripts/spark_stream.py\n\nopen http://localhost:4040/StreamingQuery\n```\n- (Optional) Run in Spark Standalone Mode\n  ```bash\n  spark-submit --master spark://localhost:7077 --packages com.datastax.spark:spark-cassandra-connector_2.12:3.5.1,org.apache.spark:spark-sql-kafka-0-10_2.12:3.5.1,org.apache.kafka:kafka-clients:3.5.1 scripts/spark_stream.py\n  open http://localhost:9090\n  ```\n- Open **DataGrip** (or other tools) to view Cassandra Data (username/pw is `cassandra`).\n  ```bash\n  docker exec -it cassandra cqlsh -u cassandra -p cassandra localhost 9042\n      describe spark_streams.created_users;\n      SELECT * FROM spark_streams.created_users;\n  ```\n- Remove all containers:\n  ```bash\n  docker compose down --volumes\n  ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdbao%2Fetl-randuser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdbao%2Fetl-randuser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdbao%2Fetl-randuser/lists"}