Integrations — Warehouses
NerveStax and PostgreSQL
Agents build and test dbt models on PostgreSQL, and hand you a pull request.
What we do
What NerveStax does with PostgreSQL
Point a project at PostgreSQL and agents build and test its dbt models on a development target from inside a sandbox, read schemas, tables and run history, and check the project against what is really in the database. It is also one of the two databases an agent can load from. Every change arrives as a pull request.
-
Builds and tests models on a dev target
dbt run, test and build execute in the sandbox against the target the project configures. On a protected project each one stops for approval before it touches the database.
-
Reads schemas, tables and columns
Agents list databases, schemas and tables, read column types and row counts, and use that instead of guessing what a model can select from.
-
Profiles and samples a table
When an agent profiles or samples a table, the rows it retrieves go to your model provider under your key. Result rows are not masked, so treat sampling as you would any query.
-
Handles the 63-character name limit
PostgreSQL truncates long identifiers rather than failing, so NerveStax keeps generated names inside the limit instead of letting two models quietly become one table.
-
Also a source you can load from
The same database can be the source of an ingestion: an agent proposes which tables to load and how to sync them, as a pull request. That part is in beta.
-
Write SQL waits for a person
Read queries run freely. Anything that is not a read against a source connection is treated as a write and stops for approval before it executes.
Background
About PostgreSQL
PostgreSQL is the open-source relational database. Data teams use it as a warehouse for smaller workloads, as the development target for a project that runs elsewhere, and as a source system to load from.
How it connects
What connecting it looks like
-
01
Create a database role
We recommend a role limited to the schemas the project reads and builds into, rather than a superuser or the owner of everything.
-
02
Add the connection
Add host, port, database, user and password in settings. They are stored encrypted, and can be replaced but never read back.
-
03
Point a project at it
Give the dbt project the target it should build into. That development target is where agent work is tested before you see it.
-
04
Mark production projects protected
Protection makes every dbt command on that project wait for a person's approval, with the command, selector and target shown.
Scope
What this does not cover
- There is no separate least-privilege identity for agent runs — an agent uses the credentials on the project, which is why the role you create matters.
- Self-hosted NerveStax also needs a PostgreSQL 14+ database of its own, with pgvector. That is separate from any warehouse connection.
Questions
PostgreSQL and NerveStax
Q01Does it run against production?+
Not without a person. dbt commands run in a sandbox against the target the project configures, normally a development one, and on a project you mark as protected every dbt run, test and build waits for approval. Code reaches production only through a pull request your team merges.
Q02Do my table rows go to the model provider?+
Only when an agent queries, samples or profiles a table — then the rows it retrieves are in the answer it reads, capped per call and not masked. Those calls go to the model provider you chose, under your own key. The rest of the time it works from schemas, dbt artifacts and run results.
Q03What permissions should the role have?+
Read on the schemas the project models from, and write on the development schemas it builds into. No more than that. There is no separate identity for agent runs, so the connection you configure is exactly what an agent can reach.
Q04Is this the same database NerveStax runs on?+
No. A self-hosted install needs its own PostgreSQL 14 or newer with the pgvector extension for the product's state, and you supply it — the Helm chart does not deploy one. A warehouse connection you add for a project is an unrelated database as far as NerveStax is concerned.
Q05Can it load data from PostgreSQL?+
Yes, in beta. An agent reads the source database, proposes which tables to load and which columns to sync on, and delivers that as a pull request. Installing, running, stopping or re-syncing the load always needs a person; those actions can never be auto-approved.