Concepts
StubberDB
Introduces StubberDB as a managed PostgreSQL database that syncs with stub data. Useful for structured querying, reporting, automation, and database-backed integrations.
StubberDB gives every Stubber org its own PostgreSQL instance, allowing you to query and analyze your stub data using standard SQL tooling without building any custom data pipelines.
Each instance contains two databases, draft and live.
Features
- Allows you to create and manage tabular data that is automatically kept in sync with your stubs on every execution.
- Provides a single
stubstable that contains a row for every stub in your org - Supports the same branch model as the rest of the platform, with separate
draftandlivedatabases that mirror your org's branches, allowing you to safely build and keep production and staging data in sync with your live and draft stubs respectively - Accessible via any standard PostgreSQL client, allowing you to query and analyze your stub data using familiar SQL tools and techniques
- Fully managed and maintained by the Stubber team, with no operational overhead for your team
- Allows you to plug in external BI (Business Intelligence) and analytics tools that support PostgreSQL as a data source
Built-in Extensions
StubberDB currently enables the following PostgreSQL extensions out of the box:
pgvectorpg_trgmbtree_gistpostgispgcrypto
These extensions are available in your StubberDB databases without any additional setup.
Draft and Live Databases
Each org's PostgreSQL instance contains two databases that mirror the platform's draft and live branch model:
draftdatabase — stubs and data from draft stubs are synchronized to this database.livedatabase — stubs and data from live stubs are synchronized to this database.
This separation means you can safely iterate on schema changes in draft without affecting your live data.
All stubberdb tasks either explicitly require a branch to be specified, or execute against the current branch of the stub.
Connecting to StubberDB
You can connect with any standard PostgreSQL client or compatible BI tool. Use the following connection settings:
The full connection strings for draft and live including credentials is available in StubberDB cloud settings.
Automatic Sync
When StubberDB is enabled on an org, the update_stubberdb action stage is added to every stub execution automatically.
Each time a stub runs, this stage synchronizes the stub's current state into the database for the appropriate branch.
Stub Table
StubberDB provides a single stubs table in each database, which contains a row for every stub in the org.
Each row in the stubs table represents a single stub and is updated on every execution. The table contains the following columns:
Enabling StubberDB
StubberDB is enabled at the org level. Once enabled, all stubs in the org will automatically begin syncing on each execution.
Go to StubberDB cloud settings to enable StubberDB for your org.