rbanepali / unit_test_dbt

unit test example in DBT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code for blog at http://www.startdataengineering.com/post/how-to-test-sql-using-dbt/

Pre-requisites

  1. docker
  2. git
  3. dbt
  4. psql

Setup

git clone https://github.com/josephmachado/unit_test_dbt.git
cd unit_test_dbt
chmod 755 setup_script.sh
chmod 755 tear_down_script.sh
chmod 755 run_dbt.sh
export PGPASSWORD=password # set password as env variable to not have to type it again
./setup_script.sh

Run

./run_dbt.sh

Tear down

./tear_down_script.sh

About

unit test example in DBT


Languages

Language:Shell 100.0%