{"id":13688346,"url":"https://github.com/cnstlungu/portable-data-stack-dagster","last_synced_at":"2025-05-01T16:31:39.395Z","repository":{"id":191259495,"uuid":"631690617","full_name":"cnstlungu/portable-data-stack-dagster","owner":"cnstlungu","description":" A portable Datamart and Business Intelligence suite built with Docker, Dagster, dbt, DuckDB and Superset ","archived":false,"fork":false,"pushed_at":"2025-02-16T20:20:41.000Z","size":739,"stargazers_count":213,"open_issues_count":1,"forks_count":38,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-16T21:24:49.399Z","etag":null,"topics":["business-intelligence","dagster","data-engineering","data-visualization","dbt","duckdb","python","superset"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnstlungu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-04-23T20:06:28.000Z","updated_at":"2025-02-16T20:20:44.000Z","dependencies_parsed_at":"2024-02-22T01:29:33.136Z","dependency_job_id":"f96f5768-9f55-4117-ace0-2acc834cd51b","html_url":"https://github.com/cnstlungu/portable-data-stack-dagster","commit_stats":null,"previous_names":["cnstlungu/portable-data-stack-dagster"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnstlungu%2Fportable-data-stack-dagster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnstlungu%2Fportable-data-stack-dagster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnstlungu%2Fportable-data-stack-dagster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnstlungu%2Fportable-data-stack-dagster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnstlungu","download_url":"https://codeload.github.com/cnstlungu/portable-data-stack-dagster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251906900,"owners_count":21663180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["business-intelligence","dagster","data-engineering","data-visualization","dbt","duckdb","python","superset"],"created_at":"2024-08-02T15:01:11.841Z","updated_at":"2025-05-01T16:31:39.389Z","avatar_url":"https://github.com/cnstlungu.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile","Learning Material","data-visualization"],"sub_categories":["Projects"],"readme":"# Portable Data Stack\n\nThis application is an Analytics suite suite for an imaginary company selling postcards. The company sells both directly but also through resellers in the majority of European countries.\n\n## Stack\n\n- Dagster\n- Docker (Docker Compose)\n- DuckDB\n- dbt core\n- Superset\n\n## Interested in the data model?\n\nGeneration of example data and the underlying dbt-core model is available in the [postcard-company-datamart](https://github.com/cnstlungu/postcard-company-datamart) project\n\n## For other stacks, check the below:\n\n- [portable-data-stack-mage](https://github.com/cnstlungu/portable-data-stack-mage)\n- [portable-data-stack-airflow](https://github.com/cnstlungu/portable-data-stack-airflow)\n- [portable-data-stack-sqlmesh](https://github.com/cnstlungu/portable-data-stack-sqlmesh)\n\n\nFor the legacy version involving OLTP, CSV and JSON sources, check out the `legacy-oltp` branch.\n\n### System requirements\n* [Docker](https://docs.docker.com/engine/install/)\n\n## Setup\n\n1. Rename `.env.example` file to `.env` and set your desired password. Remember to never commit files containing passwords or any other sensitive information.\n\n2. Rename `shared/db/datamart.duckdb.example` to `shared/db/datamart.duckdb` or init an empty database file there with that name.\n\n3. With **Docker Engine** installed, change directory to the root folder of the project (also the one that contains docker-compose.yml) and run\n\n    `docker compose up --build`\n\n    Note that this may take several minutes to completed. Check out the console to see when the Dagster interface is ready.\n\n4. Once the Docker suite has finished loading, open up [Dagster (dagit)](http://localhost:3000) , go to `Assets`, select all and click `Materialize selected`\n\n![Dagit](resources/dagit.png \"Dagit\")\n\n5. When the assets have been materialized, you can open the [Superset interface](http://localhost:8088)\n\n\n### Demo Credentials\n\nDemo credentials are set in the .env file mentioned above. \n\n### Ports exposed locally\n* Dagster (dagit): 3000\n* Superset: 8088\n\nGenerated parquet files are saved in the **shared** folder.\n\nThe data is fictional and automatically generated. Any similarities with existing persons, entities, products or businesses are purely coincidental.\n\n### General flow\n\n1. Generate test data as parquet files using Python\n2. Import data to the staging area in the Data Warehouse (DuckDB), orchestrated by Dagster\n3. Model data, build fact and dimension tables, load the Data Warehouse using dbt\n    - installs dbt dependencies\n    - seeds the database with static data (e.g. geography)\n    - runs the model\n    - tests the model\n4. Analyze and visually explore the data using Superset or directly query the Data Warehouse database instance\n\nFor superset, the default credentials are: user = admin, password = admin\n\n\n## Overview of architecture\n\nThe Docker process will begin building the application suite. The suite is made up of the following components, each within its own docker container:\n* **generator**: this is a collection of Python scripts that will generate, insert and export the example data\n* **dbt**: the data model, sourced from [postcard-company-datamart](https://github.com/cnstlungu/postcard-company-datamart) project\n* **dagster**: this is the orchestrator tool that will trigger the ETL tasks; its GUI is locally available on port 3000; \n* **superset**: this contains the web-based Business Intelligence application we will use to explore the data; exposed on port 8088.\n\nOnce the Docker building process has completed, we may open the Dagster (dagit) GUI (locally: localhost:3000) to view the orchestration of our tasks.\n\n\n\n![Dagster](resources/orchestration.png \"Orchestration with Dagster\")\n\n\nAfter the DAGs have completed you can either analyze the data using the querying and visualization tools provided by Superset (available locally on port 8088), or query the Data Warehouse (available as a DuckDB Database)\n\n![Apache Superset](resources/superset.png \"Superset\")\n\n\n## Credits\n\nInspired by:\n- [Build a poor man’s data lake from scratch with DuckDB](https://dagster.io/blog/duckdb-data-lake)\n- [Using dbt with Dagster software-defined assets](https://docs.dagster.io/integrations/dbt/using-dbt-with-dagster)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnstlungu%2Fportable-data-stack-dagster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnstlungu%2Fportable-data-stack-dagster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnstlungu%2Fportable-data-stack-dagster/lists"}