Skip to content

alvalabs/dbt-pipeline-template

Repository files navigation

DBT Project Template

This is a template for creating new dbt projects with a standardized structure.

Project Structure

project_name/ ├── analyses/ ├── macros/ ├── models/ │ ├── core/ │ ├── metrics/ │ └── staging/ ├── seeds/ ├── snapshots/ ├── tests/ └── dbt_project.yml

Getting Started

1. Project Setup

  1. Clone this template repository
  2. Rename the project:
    • Update name in dbt_project.yml
    • Update profile in dbt_project.yml
    • Update the models config section in dbt_project.yml to match your project name

2. Profile Configuration

Create a profile in your ~/.dbt/profiles.yml:

project_name: # Should match the profile name in dbt_project.yml
target: dev
outputs:
dev:
type: [warehouse_type] # snowflake, bigquery, redshift, etc.

3. Project Structure

  • models/staging/: Raw data transformations
  • models/core/: Business logic transformations
  • models/metrics/: Metric calculations and aggregations
  • analyses/: Ad-hoc analyses
  • macros/: Reusable SQL functions
  • seeds/: Static data files
  • snapshots/: Type 2 SCD tracking
  • tests/: Custom data tests

4. Model Materialization

All models are configured to materialize as tables by default. Modify the materialization settings in dbt_project.yml as needed for your use case.

Development Guidelines

  1. Follow dbt best practices
  2. Use consistent naming conventions
  3. Document your models using dbt docs
  4. Write tests for your models

Dependencies

  • dbt-core
  • (List any additional packages you're using)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published