{"id":51052581,"url":"https://github.com/eshitakundu/elearning-analytics-dbt","last_synced_at":"2026-06-22T18:32:09.562Z","repository":{"id":358937769,"uuid":"1242954199","full_name":"eshitakundu/elearning-analytics-dbt","owner":"eshitakundu","description":"End-to-end analytics engineering project - dbt Cloud + Snowflake. E-learning platform data modeled across staging, dimensions, facts, and a consolidated performance mart.","archived":false,"fork":false,"pushed_at":"2026-05-19T19:19:58.000Z","size":681,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-19T22:46:00.593Z","etag":null,"topics":["analytics-engineering","data-engineering","dbt","snowflake","sql"],"latest_commit_sha":null,"homepage":"https://eshitakundu.github.io/elearning-analytics-dbt/","language":null,"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/eshitakundu.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-18T23:17:08.000Z","updated_at":"2026-05-19T19:26:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/eshitakundu/elearning-analytics-dbt","commit_stats":null,"previous_names":["eshitakundu/dbt-snowflake-analytics"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/eshitakundu/elearning-analytics-dbt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshitakundu%2Felearning-analytics-dbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshitakundu%2Felearning-analytics-dbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshitakundu%2Felearning-analytics-dbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshitakundu%2Felearning-analytics-dbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eshitakundu","download_url":"https://codeload.github.com/eshitakundu/elearning-analytics-dbt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshitakundu%2Felearning-analytics-dbt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34661703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["analytics-engineering","data-engineering","dbt","snowflake","sql"],"created_at":"2026-06-22T18:32:09.286Z","updated_at":"2026-06-22T18:32:09.544Z","avatar_url":"https://github.com/eshitakundu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbt-snowflake-analytics\n\nEnd-to-end analytics engineering project built with dbt Cloud and Snowflake. Models a fictional e-learning platform — 6 data sources, 13 models across staging/dimension/fact layers, 47 tests, SCD Type 2 snapshot, and a live documentation site.\n\n**[Live dbt Docs →](https://eshitakundu.github.io/dbt-snowflake-analytics)**\n\n---\n\n## Architecture\n\n```\nseeds (raw CSVs)\n    ↓\nstaging (views)     — typed, cleaned, one model per source\n    ↓\ndimensions (tables) — entity attributes with derived columns\nfacts (tables)      — events joined across multiple dimensions\n    ↓\nmart_course_performance — consolidated analytical output\n```\n\n---\n\n## Stack\n\n| Tool | Role |\n|------|------|\n| dbt Cloud (Fusion 2.0) | Transformation, testing, documentation, orchestration |\n| Snowflake | Cloud data warehouse |\n| GitHub Pages | Hosts live dbt docs site |\n\n---\n\n## Data Sources\n\n| File | Rows | Description |\n|------|------|-------------|\n| `raw_students.csv` | 500 | Student profiles — country, subscription type, signup date |\n| `raw_courses.csv` | 40 | Course catalog — category, level, price, duration |\n| `raw_instructors.csv` | 20 | Instructor profiles — expertise, rating, tenure |\n| `raw_enrollments.csv` | 2,341 | Enrollment events — completion status, progress, ratings |\n| `raw_payments.csv` | 1,767 | Payment transactions — amount, method, date |\n| `raw_reviews.csv` | 767 | Course reviews — sentiment, helpful votes, verified purchase |\n\n---\n\n## Models\n\n### Staging — 6 views\nClean, typed representations of each source table. No joins, no business logic.\n\n### Dimensions — 3 tables\n| Model | Key additions |\n|-------|--------------|\n| `dim_students` | `age_group` derived from age |\n| `dim_courses` | `price_tier`, `course_length` |\n| `dim_instructors` | `experience_level`, `rating_tier` |\n\n### Facts — 3 tables\n| Model | Joins | Key additions |\n|-------|-------|--------------|\n| `fct_enrollments` | students, courses | `is_completed` boolean, `days_to_complete` |\n| `fct_payments` | students, courses | `discount_pct` vs listed price |\n| `fct_reviews` | students, courses, instructors | `rating_category` via macro |\n\n### Consolidated Mart — 1 table\n`mart_course_performance` — one row per course. Aggregates enrollment counts, completion rates, revenue, average ratings, and review sentiment. Uses both custom macros.\n\n---\n\n## Macros\n\n```sql\n{{ categorize_rating('rating') }}\n-- Maps numeric rating → 'Excellent' / 'Good' / 'Average' / 'Poor'\n\n{{ calculate_completion_rate('completed_count', 'total_enrolled') }}\n-- Returns completion % with zero-division guard\n```\n\n---\n\n## Tests\n\n**47 tests total**\n- Generic: `unique`, `not_null`, `accepted_values` across all 6 staging models\n- Singular: 4 custom SQL tests for business rule validation\n  - Price \u003e 0\n  - Progress % between 0 and 100\n  - Completion date after enrolled date\n  - Rating between 1 and 5\n\n---\n\n## Snapshot\n\n`students_snapshot` — SCD Type 2 on `subscription_type`. Tracks subscription changes over time with `dbt_valid_from` / `dbt_valid_to` timestamps.\n\n---\n\n## Running the Project\n\n```bash\ndbt seed                        # load CSVs into Snowflake raw schema\ndbt run                         # build all 13 models in dependency order\ndbt test                        # run all 47 tests\ndbt snapshot                    # capture student subscription state\ndbt compile --write-catalog     # generate catalog.json for docs site\n```\n\n---\n\n## Documentation\n\nLive dbt docs with full lineage, model descriptions, column definitions, and test results:\n\n**[eshitakundu.github.io/dbt-snowflake-analytics](https://eshitakundu.github.io/dbt-snowflake-analytics)**\n\n---\n\n## Limitations \u0026 Future Improvements\n\n- **No live data source** — seed CSVs replace a real ingestion layer. Production version would pull from a REST API or S3 via Airflow.\n- **No BI dashboard** — mart tables are warehouse-ready but Superset/Metabase visualization is not yet connected.\n- **Single snapshot** — only `subscription_type` is tracked historically. Course pricing changes are not captured.\n- **dbt Fusion limitations** — running on Fusion 2.0 preview which has breaking changes from dbt Core. `accepted_values` test syntax differs from standard dbt documentation.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshitakundu%2Felearning-analytics-dbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feshitakundu%2Felearning-analytics-dbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshitakundu%2Felearning-analytics-dbt/lists"}