BankOrg Docs

In progress

BankOrg Data Platform / Environment Setup

Initiating dbt Project

Create the bankorg dbt project: pinned versions, project configuration and layout.

This page creates the bankorg dbt project. Connecting it to Snowflake is covered in Connect dbt to Snowflake.

Prerequisites

  • Python 3.10 to 3.13.
  • A virtual environment, with dbt-core and dbt-snowflake installed at the versions pinned in the repository.
requirements.txt
dbt-core==1.11.16
dbt-snowflake==1.11.6
Terminal
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
dbt --version

Initialise the project

The dbt project lives in the dbt/ folder of the repository. Initialise it with the project name bankorg, choose snowflake as the database, then rename or move the generated folder to dbt/.

Terminal
dbt init bankorg

Project configuration

The starter dbt_project.yml is replaced with the BankOrg configuration. Staging models are views in the CORE_BANKING schema of PRD_STAGING, marts are tables in CORE, and snapshots go to SNAPSHOTS.

dbt/dbt_project.yml
name: bankorg
version: "0.1.0"
config-version: 2

profile: bankorg

model-paths: ["models"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
test-paths: ["tests"]
seed-paths: ["seeds"]

clean-targets:
  - target
  - dbt_packages

models:
  bankorg:
    staging:
      core_banking:
        +materialized: view
        +database: PRD_STAGING
        +schema: CORE_BANKING
    marts:
      core:
        +materialized: table
        +schema: CORE

snapshots:
  bankorg:
    +schema: SNAPSHOTS

Project layout

dbt/
dbt/
├── dbt_project.yml
├── packages.yml
├── profiles.yml.example
├── macros/
├── models/
│   ├── staging/core_banking/
│   └── marts/core/
├── snapshots/
└── tests/

Install packages and check the setup

From the dbt/ folder, dbt deps installs the packages listed in packages.yml, and dbt debug validates the project file, the profile and the Snowflake connection.

Terminal
cd dbt
dbt deps
dbt debug