firstnapat / dbt-unit-test-101

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started

Prerequisites

  • poetry
    https://python-poetry.org/docs/

Installation

  1. Clone the repo

    git clone git@github.com:firstnapat/dbt-unit-test-101.git
  2. Install Python package

    poetry install
  3. Install dbt packages

    dbt deps
  4. Setting profiles

    • Get service account from GCP
    • set keyfile: your-service-account-path.json in profiles.yml

    set_service_account

Run

  1. Load source to BigQuery
    dbt seed
  2. Run Staging model
    dbt run
  3. Test
    dbt test --select tests/unit/staging/

Resources:

About