# dave-melillo/data_eng_ai architecture

> Architecture diagram of the GitHub repository dave-melillo/data_eng_ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dave-melillo/data_eng_ai
- Repository: https://github.com/dave-melillo/data_eng_ai

## Overview

This is a companion-code repository for a hands-on data-engineering book, not a single deployable application. Its principal learning workflow progresses from prompting and API use through data-quality and transformation techniques to Airflow-orchestrated AI pipelines. The chapter 8 news DAG makes that workflow concrete: it extracts news, transforms it with AI, categorizes and checks quality, then writes to PostgreSQL. The graph preserves README-documented capabilities as well; several chapter branches are represented at directory level because their source was not sampled.

Main entry points: [`ch08/airflow_project/dags/news_pipeline_dag.py`](https://github.com/dave-melillo/data_eng_ai/blob/main/ch08/airflow_project/dags/news_pipeline_dag.py) (News ETL DAG), [`ch12/listings/12_3.py`](https://github.com/dave-melillo/data_eng_ai/blob/main/ch12/listings/12_3.py) (URL discovery agent), [`ch09/airflow_project/dags/world_series_pipeline.py`](https://github.com/dave-melillo/data_eng_ai/blob/main/ch09/airflow_project/dags/world_series_pipeline.py) (Game analysis DAG), [`ch02/2_2_sample_response.py`](https://github.com/dave-melillo/data_eng_ai/blob/main/ch02/2_2_sample_response.py) (Prompting examples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["AI Foundations"]
  node_prompting["Prompting examples"]
  node_sql_prompting["SQL prompting"]
  node_python_ai["Python with AI"]
end

subgraph group_data_work["Data Workflows"]
  node_api_workflows["OpenAI workflows"]
  node_quality["Data quality"]
  node_transformations["Advanced transformations"]
end

subgraph group_orchestration["AI Orchestration"]
  node_lifecycle["Lifecycle agents"]
  node_news_dag["News ETL DAG"]
  node_world_series["Game analysis DAG"]
end

subgraph group_advanced["Advanced Applications"]
  node_web_scraping["Web scraping"]
  node_ai_opportunities["AI data opportunities"]
  node_url_discovery["URL discovery agent<br/>[12_3.py]"]
end

node_learner(("Data engineer"))
node_newsapi{{"NewsAPI"}}
node_openai{{"OpenAI API"}}
node_postgres[("PostgreSQL")]
node_airflow{{"Apache Airflow"}}

node_learner -->|"learns prompting"| node_prompting
node_learner -->|"learns SQL"| node_sql_prompting
node_learner -->|"learns Python"| node_python_ai
node_learner -->|"builds API workflows"| node_api_workflows
node_learner -->|"learns validation"| node_quality
node_learner -->|"learns transformations"| node_transformations
node_learner -->|"studies agents"| node_lifecycle
node_learner -->|"studies orchestration"| node_world_series
node_learner -->|"studies scraping"| node_web_scraping
node_learner -->|"studies AI uses"| node_ai_opportunities
node_learner -->|"explores URL discovery"| node_url_discovery
node_news_dag -->|"fetches articles"| node_newsapi
node_news_dag -->|"enriches articles"| node_openai
node_news_dag -->|"writes articles"| node_postgres
node_airflow -->|"runs DAG"| node_news_dag
node_airflow -->|"runs DAG"| node_world_series
node_url_discovery -->|"ranks candidates"| node_openai

click node_prompting "https://github.com/dave-melillo/data_eng_ai/blob/main/ch02/2_2_sample_response.py"
click node_sql_prompting "https://github.com/dave-melillo/data_eng_ai/tree/main/ch03"
click node_python_ai "https://github.com/dave-melillo/data_eng_ai/tree/main/ch04"
click node_api_workflows "https://github.com/dave-melillo/data_eng_ai/tree/main/ch05/listings"
click node_quality "https://github.com/dave-melillo/data_eng_ai/tree/main/ch06/listings"
click node_transformations "https://github.com/dave-melillo/data_eng_ai/tree/main/ch07/listings"
click node_lifecycle "https://github.com/dave-melillo/data_eng_ai/tree/main/ch08/listing"
click node_news_dag "https://github.com/dave-melillo/data_eng_ai/blob/main/ch08/airflow_project/dags/news_pipeline_dag.py"
click node_world_series "https://github.com/dave-melillo/data_eng_ai/blob/main/ch09/airflow_project/dags/world_series_pipeline.py"
click node_web_scraping "https://github.com/dave-melillo/data_eng_ai/tree/main/ch10"
click node_ai_opportunities "https://github.com/dave-melillo/data_eng_ai/tree/main/ch11"
click node_url_discovery "https://github.com/dave-melillo/data_eng_ai/blob/main/ch12/listings/12_3.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_prompting,node_sql_prompting,node_python_ai toneBlue
class node_api_workflows,node_quality,node_transformations,node_postgres toneAmber
class node_lifecycle,node_news_dag,node_world_series,node_newsapi,node_openai toneMint
class node_web_scraping,node_ai_opportunities,node_url_discovery toneRose
class node_learner,node_airflow toneIndigo
```

## Components

### AI Foundations

- [Prompting examples](https://github.com/dave-melillo/data_eng_ai/blob/main/ch02/2_2_sample_response.py): `ch02/2_2_sample_response.py`
- [SQL prompting](https://github.com/dave-melillo/data_eng_ai/tree/main/ch03): `ch03`
- [Python with AI](https://github.com/dave-melillo/data_eng_ai/tree/main/ch04): `ch04`

### Data Workflows

- [OpenAI workflows](https://github.com/dave-melillo/data_eng_ai/tree/main/ch05/listings): `ch05/listings`
- [Data quality](https://github.com/dave-melillo/data_eng_ai/tree/main/ch06/listings): `ch06/listings`
- [Advanced transformations](https://github.com/dave-melillo/data_eng_ai/tree/main/ch07/listings): `ch07/listings`

### AI Orchestration

- [Lifecycle agents](https://github.com/dave-melillo/data_eng_ai/tree/main/ch08/listing): `ch08/listing`
- [News ETL DAG](https://github.com/dave-melillo/data_eng_ai/blob/main/ch08/airflow_project/dags/news_pipeline_dag.py): `ch08/airflow_project/dags/news_pipeline_dag.py`
- [Game analysis DAG](https://github.com/dave-melillo/data_eng_ai/blob/main/ch09/airflow_project/dags/world_series_pipeline.py): `ch09/airflow_project/dags/world_series_pipeline.py`

### Advanced Applications

- [Web scraping](https://github.com/dave-melillo/data_eng_ai/tree/main/ch10): `ch10`
- [AI data opportunities](https://github.com/dave-melillo/data_eng_ai/tree/main/ch11): `ch11`
- [URL discovery agent](https://github.com/dave-melillo/data_eng_ai/blob/main/ch12/listings/12_3.py): `ch12/listings/12_3.py`

### Other components

- **Data engineer**
- **NewsAPI**
- **OpenAI API**
- **PostgreSQL**
- **Apache Airflow**

## Connections

- Data engineer → Prompting examples: learns prompting (evidence: `README.md`)
- Data engineer → SQL prompting: learns SQL (evidence: `README.md`)
- Data engineer → Python with AI: learns Python (evidence: `README.md`)
- Data engineer → OpenAI workflows: builds API workflows (evidence: `README.md`)
- Data engineer → Data quality: learns validation (evidence: `README.md`)
- Data engineer → Advanced transformations: learns transformations (evidence: `README.md`)
- Data engineer → Lifecycle agents: studies agents (evidence: `README.md`)
- Data engineer → Game analysis DAG: studies orchestration (evidence: `README.md`)
- Data engineer → Web scraping: studies scraping (evidence: `README.md`)
- Data engineer → AI data opportunities: studies AI uses (evidence: `README.md`)
- Data engineer → URL discovery agent: explores URL discovery (evidence: `README.md`)
- News ETL DAG → NewsAPI: fetches articles (evidence: `ch08/airflow_project/dags/news_pipeline_dag.py`)
- News ETL DAG → OpenAI API: enriches articles (evidence: `ch08/airflow_project/dags/news_pipeline_dag.py`)
- News ETL DAG → PostgreSQL: writes articles (evidence: `ch08/airflow_project/dags/news_pipeline_dag.py`)
- Apache Airflow → News ETL DAG: runs DAG (evidence: `README.md`)
- Apache Airflow → Game analysis DAG: runs DAG (evidence: `README.md`)
- URL discovery agent → OpenAI API: ranks candidates (evidence: `ch12/listings/12_3.py`)
