# leeyoungkon/ch6_data_architecture architecture

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

- Interactive diagram: https://gitdiagram.com/leeyoungkon/ch6_data_architecture
- Repository: https://github.com/leeyoungkon/ch6_data_architecture

## Overview

This repository is a small PySpark/MinIO demo. Its main workflow reads orders.csv, writes the data as Parquet to an S3-compatible store, then reads and displays it with a separate script. Two standalone scripts print Python or Spark/Hadoop version information. The graph reflects only the shown scripts; docker-compose.yml is present, but its contents and service wiring were not provided.

Main entry points: [`test1.py`](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/test1.py) (CSV to Parquet), [`test2.py`](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/test2.py) (Parquet reader), [`hadoopversionconfirm.py`](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/hadoopversionconfirm.py) (Spark/Hadoop info), [`hello.py`](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/hello.py) (Python info)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_demo["Data demo"]
  node_csv["Orders CSV<br/>[orders.csv]"]
  node_etl["CSV to Parquet<br/>[test1.py]"]
  node_reader["Parquet reader<br/>[test2.py]"]
end

subgraph group_diagnostics["Diagnostics"]
  node_python_check["Python info<br/>[hello.py]"]
  node_version_check["Spark/Hadoop info"]
end

node_user(("Operator"))
node_spark["Spark runtime"]
node_store[("MinIO store")]
node_terminal["Terminal output"]

node_user -->|"runs"| node_etl
node_etl -->|"reads"| node_csv
node_etl -->|"starts"| node_spark
node_etl -->|"writes Parquet"| node_store
node_user -->|"runs"| node_reader
node_reader -->|"starts"| node_spark
node_reader -->|"reads Parquet"| node_store
node_reader -->|"prints rows/count"| node_terminal
node_user -->|"runs"| node_python_check
node_python_check -->|"prints version"| node_terminal
node_user -->|"runs"| node_version_check
node_version_check -->|"starts"| node_spark
node_version_check -->|"prints versions"| node_terminal

click node_csv "https://github.com/leeyoungkon/ch6_data_architecture/blob/main/orders.csv"
click node_etl "https://github.com/leeyoungkon/ch6_data_architecture/blob/main/test1.py"
click node_reader "https://github.com/leeyoungkon/ch6_data_architecture/blob/main/test2.py"
click node_python_check "https://github.com/leeyoungkon/ch6_data_architecture/blob/main/hello.py"
click node_version_check "https://github.com/leeyoungkon/ch6_data_architecture/blob/main/hadoopversionconfirm.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_csv,node_etl,node_reader toneBlue
class node_python_check,node_version_check,node_store toneAmber
class node_user,node_spark,node_terminal toneIndigo
```

## Components

### Data demo

- [Orders CSV](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/orders.csv): `orders.csv`
- [CSV to Parquet](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/test1.py): `test1.py`
- [Parquet reader](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/test2.py): `test2.py`

### Diagnostics

- [Python info](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/hello.py): `hello.py`
- [Spark/Hadoop info](https://github.com/leeyoungkon/ch6_data_architecture/blob/main/hadoopversionconfirm.py): `hadoopversionconfirm.py`

### Other components

- **Operator**
- **Spark runtime**
- **MinIO store**
- **Terminal output**

## Connections

- Operator → CSV to Parquet: runs
- CSV to Parquet → Orders CSV: reads (evidence: `test1.py`)
- CSV to Parquet → Spark runtime: starts (evidence: `test1.py`)
- CSV to Parquet → MinIO store: writes Parquet (evidence: `test1.py`)
- Operator → Parquet reader: runs
- Parquet reader → Spark runtime: starts (evidence: `test2.py`)
- Parquet reader → MinIO store: reads Parquet (evidence: `test2.py`)
- Parquet reader → Terminal output: prints rows/count (evidence: `test2.py`)
- Operator → Python info: runs
- Python info → Terminal output: prints version (evidence: `hello.py`)
- Operator → Spark/Hadoop info: runs
- Spark/Hadoop info → Spark runtime: starts (evidence: `hadoopversionconfirm.py`)
- Spark/Hadoop info → Terminal output: prints versions (evidence: `hadoopversionconfirm.py`)
