Skip to main content

PostgreSQL

Zingle connects to PostgreSQL - and to Postgres-based warehouses such as WarehousePG - to run SQL, introspect your schemas, preview data, and check the impact of changes.

Requirements​

  • A PostgreSQL database (or a Postgres-compatible warehouse) reachable from Zingle.
  • A database user for Zingle, scoped to least privilege (see below).
  • Credentials - a username and password, per user and/or one organization-level service credential.

Connections use SSL by default.

Access needed​

Zingle never writes to a production target. This is enforced inside the product: every SQL statement sent to production is checked before it runs, and dbt commands that could write refuse to run against production. See the Production safety model.

As a second layer, scope the user you grant to least privilege:

  • Read access to the schemas Zingle should introspect and query.
  • No privileges to modify your production tables.
  • In your development database, permission to create schemas. Agents build changed models into scratch schemas there, and drop them when the session closes.

Connection model​

  • A connection holds the host, port, and connection-level configuration (created once by an admin, shared across the org).
  • Targets are a database and schema to run against. A connection can have multiple targets.
  • Credentials are either a user's personal credential or an optional organization-level service credential. Both are encrypted. See Credential handling.

See Warehouse connections.

What it enables​

  • Run SQL to answer questions and preview model output.
  • Introspect schemas - list schemas, tables, and columns.
  • Check the impact of a change - build the changed models into session scratch schemas in development, then compare the results before and after.
  • Monitor a migration - compare a table against its counterpart in another warehouse. See Migrate & Monitoring.

What it can't do​

  • Zingle never builds into or writes to production.
  • Query results are row-capped (currently 1,000 max). See Data handling.
  • Zingle can never do more in the database than the user you grant permits.

Common setup issues​

  • Connection test fails. Check the host, port, database name, and credentials, and that the database accepts SSL connections from Zingle's network.
  • Queries can't see expected objects. The user likely lacks grants on those schemas.
  • Impact checks fail to build. The user likely lacks permission to create schemas in your development database.