Demo Repo for dbt Testing Functionality
The following packages and tools were used to build this demo.
requirement | version used | purpose |
---|---|---|
docker | 20.10.14 | Containerized PostgreSQL database |
python | 3.9.6 | required for dbt and virtual environments |
dbt core | 1.5.2 | Develop/run data pipelines. 1.5.0 is the minimum required |
dbt-postgres | 1.5.2 | Used for integration with PostgreSQL |
On a command prompt, navigate to the docker/postgresql
directory start the PostgreSQL docker container by running docker compose up
.
This will do the following:
- Start a PostgreSQL docker container
- Load PostgreSQL db with initial data
- Start pgAdmin as a web interface for postgres
The creation of the connection from pgAdmin to postgres is not automated yet. Here are the steps to set up a connection.
- Open a browser and navigate to http://localhost:5050/
- Log in with the username/password listed in docker/postgresql/docker-compose.yml
PGADMIN_DEFAULT_EMAIL: [email protected] PGADMIN_DEFAULT_PASSWORD: root
- In Object Explorer, right-click
Servers
, thenRegister
, thenServer
and enter the following details and then click save:- General Tab
- Name:
local
- Name:
- Connection
- Host name/address:
pgdatabase
- Username:
postgres
- Password:
ITsC0mpl1cat3d
- Host name/address:
- General Tab
Now, you should see the local
database server. Within the database, you will see three (3) tables under Databases/postgres/Schemas/bronze/Tables.