Tip
If you already have a Yellowbrick instance running, skip the steps to set up and clean up Yellowbrick.
Warning
On Apple Silicon Macs, Yellowbrick Community Edition works with OrbStack but not with Docker Desktop.
-
Start a Yellowbrick Community Edition instance:
docker run -d --rm --privileged --name yellowbrick -p 443:443 -p 5432:5432 yellowbrickdata/yb-community-edition:latest
-
Wait for the service to be ready (it should print
localhost:5432 - accepting connections):docker exec yellowbrick pg_isready -h localhost -p 5432
-
Install the PostgreSQL ADBC driver:
dbc install postgresql
-
Customize the Go program
main.goas needed- Change the connection arguments in the
NewDatabase()call- Format
uriaccording to the connection URI format used by PostgreSQL, or keep it as is
- Format
- Change the SQL SELECT statement in
stmt.SetSqlQuery()if desired
- Change the connection arguments in the
-
Run the Go program:
go mod tidy go run main.go
Stop the Docker container running Yellowbrick:
docker stop yellowbrick