{"id":26716397,"url":"https://github.com/paty-oliveira/edit-analytics-eng-postgresql","last_synced_at":"2026-01-06T18:04:52.515Z","repository":{"id":259002370,"uuid":"875301106","full_name":"paty-oliveira/edit-analytics-eng-postgresql","owner":"paty-oliveira","description":"Repository for Analytics Engineering Module - EDIT academy","archived":false,"fork":false,"pushed_at":"2024-12-02T11:52:45.000Z","size":9801,"stargazers_count":0,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T15:18:58.789Z","etag":null,"topics":["analytics-engineering","dbt","dbt-core","docker-compose","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/paty-oliveira.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}},"created_at":"2024-10-19T16:07:31.000Z","updated_at":"2025-03-24T17:56:01.000Z","dependencies_parsed_at":"2024-10-22T13:05:43.462Z","dependency_job_id":null,"html_url":"https://github.com/paty-oliveira/edit-analytics-eng-postgresql","commit_stats":null,"previous_names":["paty-oliveira/edit-analytics-eng","paty-oliveira/edit-analytics-eng-postgresql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paty-oliveira%2Fedit-analytics-eng-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paty-oliveira%2Fedit-analytics-eng-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paty-oliveira%2Fedit-analytics-eng-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paty-oliveira%2Fedit-analytics-eng-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paty-oliveira","download_url":"https://codeload.github.com/paty-oliveira/edit-analytics-eng-postgresql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245868329,"owners_count":20685609,"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":["analytics-engineering","dbt","dbt-core","docker-compose","postgresql"],"created_at":"2025-03-27T15:19:01.664Z","updated_at":"2026-01-06T18:04:52.509Z","avatar_url":"https://github.com/paty-oliveira.png","language":"Makefile","readme":"# Analytics Engineering Module\n\n## How to start\n1. Fork this repository and clone it locally. If you're unsure how to fork a repository, check this [tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).\n2. Set up your local [enviroment](#setup-the-environment).\n3. Load the [data sources](#load-data-sources).\n4. Solve the exercises provided during the classroom sessions by committing your changes.\n5. Once all exercises are completed, create a Pull request to this repository. If you're unsure how to create a pull request from a fork, refer to this [tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).\n6. Ensure your code passes the automated tests.\n\n\n## Setup the environment\nIn the folder `starbucks_dw`, run the following commands:\n\n1. **Create Python virtual environment:**\n\n```\n    make create-venv\n```\n\n2. **Activate your Python virtual enviroment:**\n\n```\n    source ./venv/bin/activate\n```\n\n3. **Initialise PostgresSQL database:**\n\nMake sure you have Docker running on your machine:\n\n```\n    make setup-postgres-db\n```\nIf you want to use a graphic interface to access PostgreSQL, you can use Adminer. To do this, go to `localhost:8080` and then fill the credentials:\n\n- **Database Engine**: PostgreSQL\n- **Server**: postgres\n- **User**: dbt\n- **Password**: password1\n- **Database**: dw_starbucks\n\n4. **Install pre-commit hooks:**\n\n```\n    pre-commit install\n```\n\n5. **Check the database connection in dbt:**\n\n```\n    make dbt-debug\n```\n\n## Load data sources\n\nThe data sources of this project are three CSV files containing Starbucks Customer Data, available on [Kaggle](https://www.kaggle.com/datasets/ihormuliar/starbucks-customer-data/).\n\nThis dataset was provided by Starbucks to simulate customer and transaction data, aiming to explore better approaches for sending promotional deals to customers.\n\nThese data sources are located in the `seeds/` folder and  will be ingested as [seeds](https://docs.getdbt.com/docs/build/seeds).\n\n- `portfolio.csv`: Information about the promotional offers that are possible to receive, and basic information about each one.\n- `profile.csv`: Information about the customers that are part of the promotional offers program.\n- `transcript.csv`: Information about the different steps of promotional offers that a customer receives. It also contains information about the transactions that the customer makes.\n\nTo load these files on the PostgresSQL database running in the docker container, run the following command:\n\n```\n    make dbt-seed\n```\n\nThese three data sources will be loaded into the `raw` schema. Refer to the `dbt_project.yml` file to review the schema configuration settings.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaty-oliveira%2Fedit-analytics-eng-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaty-oliveira%2Fedit-analytics-eng-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaty-oliveira%2Fedit-analytics-eng-postgresql/lists"}