How werkanalytics/finance-analytics-platform works
This is a financial data platform: Airflow coordinates Python ingestion into PostgreSQL, dbt builds layered analytical models, and Superset provides visualization. The graph groups related loaders and SQL models rather than listing every model file. ETL-to-loader and database relationships are visible in the sampled source; the dbt layer transitions and Superset usage are documented in the README, since their runtime source was not sampled.
Main entry points: etl_scripts.py Airflow DAG · database.py Database connection · company.py Company loader · stock_prices.py Price loader
Components 18
Orchestration
- Airflow DAG
dags/etl_scripts.py
Financial ingestion
- Ticker loader
etl/ticker.py - Company loader
etl/company.py - Price loader
etl/stock_prices.py - Financials loader
etl/financials.py - Income loader
etl/income_statement.py - Balance loader
etl/balance_sheet.py - Cash flow loader
etl/cash_flow.py - Recommendations loader
etl/recommendations.py - Earnings dates loader
etl/earnings_dates.py - Database connection
etl/database.py - PostgreSQL
Warehouse modeling
- Staging models
models/staging - Warehouse models
models/dwh - Category daily mart
models/mart/mart_category_daily.sql
Analytics
- Superset analytics
Other components
- Pipeline operator
- Financial data source
Connections 41
- Pipeline operator → Airflow DAG: triggers
README.md - Airflow DAG → Ticker loader: runs
dags/etl_scripts.py - Airflow DAG → Company loader: runs
dags/etl_scripts.py - Airflow DAG → Price loader: runs
dags/etl_scripts.py - Airflow DAG → Financials loader: runs
dags/etl_scripts.py - Airflow DAG → Income loader: runs
dags/etl_scripts.py - Airflow DAG → Balance loader: runs
dags/etl_scripts.py - Airflow DAG → Cash flow loader: runs
dags/etl_scripts.py - Airflow DAG → Recommendations loader: runs
dags/etl_scripts.py - Airflow DAG → Earnings dates loader: runs
dags/etl_scripts.py - Airflow DAG → Staging models: builds downstream
README.md - Ticker loader → Database connection: gets engine
etl/ticker.py - Company loader → Database connection: gets engine
etl/company.py - Price loader → Database connection: gets engine
etl/stock_prices.py - Financials loader → Database connection: gets engine
etl/financials.py - Income loader → Database connection: gets engine
etl/income_statement.py - Balance loader → Database connection: gets engine
etl/balance_sheet.py - Cash flow loader → Database connection: gets engine
etl/cash_flow.py - Recommendations loader → Database connection: gets engine
etl/recommendations.py - Earnings dates loader → Database connection: gets engine
etl/earnings_dates.py - Ticker loader → PostgreSQL: writes tickers
etl/ticker.py - Company loader → PostgreSQL: reads tickers; writes companies
etl/company.py - Price loader → PostgreSQL: reads tickers; writes prices
etl/stock_prices.py - Financials loader → PostgreSQL: reads tickers; writes financials
etl/financials.py - Income loader → PostgreSQL: reads tickers; writes statements
etl/income_statement.py - Balance loader → PostgreSQL: reads tickers; writes statements
etl/balance_sheet.py - Cash flow loader → PostgreSQL: reads tickers; writes cash flows
etl/cash_flow.py - Recommendations loader → PostgreSQL: reads tickers; writes data
etl/recommendations.py - Earnings dates loader → PostgreSQL: reads tickers; writes dates
etl/earnings_dates.py - Company loader → Financial data source: fetches company data
etl/company.py - Price loader → Financial data source: downloads prices
etl/stock_prices.py - Financials loader → Financial data source: fetches financials
etl/financials.py - Income loader → Financial data source: fetches statements
etl/income_statement.py - Balance loader → Financial data source: fetches statements
etl/balance_sheet.py - Cash flow loader → Financial data source: fetches cash flows
etl/cash_flow.py - Recommendations loader → Financial data source: fetches recommendations
etl/recommendations.py - Earnings dates loader → Financial data source: fetches earnings dates
etl/earnings_dates.py - PostgreSQL → Staging models: transforms source data
README.md - Staging models → Warehouse models: cleans and models
README.md - Warehouse models → Category daily mart: builds analytical marts
README.md - Category daily mart → Superset analytics: supports visualization
README.md