This repository contains a DBT (Data Build Tool) project for e-commerce data analysis. This project is designed to facilitate the management and transformation of data from various e-commerce sources into clean data models that can be used for further analysis.
dbt-ecommerce/
├── README.md
├── requirements.txt
└── dbt_ecommerce/
├── analysis/
├── data/
├── dbt_project.yml
├── logs/
├── models/
│ ├── stg/
│ └── mart/
├── snapshots/
├── tests/
└── target/
Before running this project, ensure you have followed the instructions in this repository: ClickHouse E-commerce to activate your ClickHouse instance as an OLAP database.
Additionally, make sure you have installed:
-
Clone this repository to your local machine:
git clone https://github.com/nabilraihann/dbt-ecommerce.git cd dbt-ecommerce
-
Create a virtual environment using conda and activate it:
conda create --name dbt-ecommerce python=3.9 conda activate dbt-ecommerce
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure the
profiles.yml
file on your.dbt
directory to set up the database connection. Example configuration:dbt_ecommerce: target: dev outputs: dev: type: clickhouse schema: dwh user: default password: ""
To run the DBT project and build the models:
cd dbt_ecommerce
dbt run
To generate project documentation:
dbt docs generate
To serve the documentation locally:
dbt docs serve