Start Postgres in Docker:
make setup-postgres
Create and Populate Databases:
make create-postgres populate-postgres
Run the Proxy Server in Local Mode:
make local-run
Connect to the Proxy Server:
psql postgres://postgres:postgres@127.0.0.1:5432/main
make testCheck Postgres Version:
SELECT version();Read Data:
SELECT*FROM employees;
Measure Data:
SELECT name, MEASURE(head_count) FROM employees GROUP BY name; -- Same as:SELECT name, COUNT(id) FROM employees GROUP BY name;
SERVER_HOST: Host address for the server.
Default:127.0.0.1SERVER_PORT: Port number for the server.
Default:5433POSTGRES_USER: PostgreSQL username.
Default:postgresPOSTGRES_PASSWORD: PostgreSQL password.
Default:postgresPOSTGRES_HOST: PostgreSQL host address.
Default:localhost:5432POSTGRES_DB: PostgreSQL database name.
Default:mainSNOWFLAKE_ACCOUNT: Snowflake account identifier.
Default: NoneSNOWFLAKE_USER: Snowflake username.
Default: NoneSNOWFLAKE_PASSWORD: Snowflake password.
Default: NoneSNOWFLAKE_WAREHOUSE: Snowflake warehouse name (optional).
Default: NoneSNOWFLAKE_DATABASE: Snowflake database name (optional).
Default: NoneSNOWFLAKE_SCHEMA: Snowflake schema name (optional).
Default: NoneSNOWFLAKE_ROLE: Snowflake role name (optional).
Default: NoneSNOWFLAKE_TIMEOUT: Timeout for Snowflake connection in seconds (optional).
Default: NoneTENANT: Tenant name for S3.
Default: NoneS3_BUCKET_NAME: Name of the S3 bucket.
Default: NoneJSON_PATH: Path to the JSON file for the semantic model.
Default: None
make setup-postgres: Pull and run Postgres in Docker.make create-postgres: Create the necessary databases.make populate-postgres: Populate the main database with sample data.make local-run: Start the PGWire proxy server in local mode.make production-run: Start the PGWire proxy server in production mode.make test: Run the test suite.make teardown: Stop and remove Docker containers.make clean: Stop and clean up containers and build files.
- Ensure the proxy server is running on port
5433. - Ensure
psqlis installed:
psql --versionIf not, install it:
- MacOS:
brew doctor brew update brew install libpq brew link --force libpq
- Ubuntu:
sudo apt update sudo apt install postgresql-client
Verify installation:
psql --version