Market Pulse is a stock market data analytics platform built to demonstrate an end-to-end Data Engineering workflow, from data ingestion to analytical data marts.
The project uses Python to ingest stock market data, PostgreSQL to store the data, dbt to transform and model it, and Apache Airflow to orchestrate the entire pipeline. Docker and Docker Compose provide a reproducible local development environment.
Stock Market API
│
▼
Python Ingestion
│
▼
PostgreSQL
└── raw
│
▼
dbt
│
├── staging
├── intermediate
└── marts
│
▼
Analytical Data
Airflow orchestrates the pipeline:
Ingestion
│
▼
Load Raw Data
│
▼
dbt Transformations
│
▼
dbt Tests
│
▼
Data Marts
| Technology | Purpose |
|---|---|
| Python | Data ingestion and processing |
| Apache Airflow | Pipeline orchestration |
| PostgreSQL | Data storage |
| SQL | Data querying and transformation |
| dbt | Data transformation and modeling |
| Docker | Containerization |
| Docker Compose | Local infrastructure |
| Git | Version control |
Contains data loaded from the external stock market data source with minimal transformation.
Cleans and standardizes the raw data using dbt.
Contains reusable transformation logic used to prepare data for analytical models.
Contains business-oriented datasets designed for analytics and reporting.
Install:
- Git
- Docker
- Docker Compose
- Python 3.10+
- PostgreSQL client
- dbt with the PostgreSQL adapter
git clone <https://github.com/devharnold/marketpulse>
cd marketpulseCreate a .env file:
cp .env.example .envUpdate the values in .env with the required database and API configuration.
Never commit .env or API credentials to Git.
Market Pulse uses Docker Compose for the local infrastructure.
docker compose up -dCheck the running services:
docker compose psView logs:
docker compose logs -fAirflow is available at:
http://localhost:8080
Use the credentials configured by the Docker Compose setup. This is assuming that you have mapped all the deps to the airflow's container.
Install the PostgreSQL adapter:
uv add dbt-postgresConfigure the dbt PostgreSQL connection in:
~/.dbt/profiles.yml
Test the connection:
dbt debugFrom the dbt project directory:
dbt buildThis executes the dbt models and their associated tests.
Trigger the Market Pulse DAG from the Airflow web interface.
The DAG coordinates:
- Stock market data ingestion
- Data validation
- Loading data into PostgreSQL
- dbt transformations
- dbt data quality tests
- Creation of analytical data marts
# Start the project
docker compose up -d
# Check services
docker compose ps
# View logs
docker compose logs -f
# Stop the project
docker compose down
# Restart services
docker compose restart
# Rebuild containers
docker compose up -d --build
# Run dbt
dbt build
# Test dbt connection
dbt debugMarket Pulse is primarily a Data Engineering project focused on demonstrating the complete lifecycle of analytical data:
Ingest → Store → Transform → Test → Model → Analyze